[OBIEE 10.3] Executing an external program

In the User guide (b31797.pdf), page 205 there is an example of how to start winword.exe from a dashboard page. I can't get this to work.
It works fine if I cut the underlying HTML and put it in a blank page, but not when it's on a dashboard. Is there a security setting or something?
Best Regards
H.

zack_m wrote:
Guys, i am the original poster of this topic, for some reason the forum wouldn't let me log in with my other account, maybe i forgot the password, just so you know lol.
Anyway, the command line tool that i want to execute is called Lads.exe, it is a tool to view Alternate Data Streams associated with files (Alternate Data Streams (ADS) allow files to be attached to other files on windows XP but there is no native tool on the OS to view them, so you can in effect hide file in them). You can download Lads.exe for free, and when it is run at the command line it accepts an argument at the same time (a directory to search for ADS in), an example would be:
" c:\lads.exe c:\programfiles "
You see?That can depend on the implementation.
But normally you would grab the stdin stream (in java) and then send commands to it.
>
But, the the nature of the tool that i'm trying to execute doesn't really matter, That isn't true. Trying to run a command shell command, andexecutable (with no input) and an executable that requires stdin input and an executable that uses another input mechanism such as a gui all require significantly different ways to access them.
You certainly can't implement it in java without understanding how it works in the first place.
If the tool you mention above does use stdin then you can use "<" and a file to force input in via stdin. If that works then the same will in java.

Similar Messages

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • How can an add-on like Firesheep access and execute an external program like Winpcap? Is that a security flaw in Firefox?

    I have been reading about the Firesheep add-on that allows the user to hijack sessions of users on the network by stealing the cookie. I understand that to prevent any application from stealing the cookie, the cookie should not be passed by the site without SSL. However, my understanding of how Firesheep works is that it interfaces with Winpcap (a network sniffer). So my question is "How can an add-on execute an external program or operating system command like Winpcap?" Can any add-on do this and should I be extremely afraid of downloading any add-on because of the potential that it could have complete access to my system?

    Hi Scott-L.
    You asked a very good question and it turns out you're right.
    However, one must be aware that download an Addon on another website that Mozilla may be dangerous. Indeed, the Addons found on the Addon Center are checked (roughly).
    In addition, Firefox includes a blacklist that blocks addons identified as malicious.
    More information here: [http://www.computerworld.com/s/article/9193420/Mozilla_No_kill_switch_for_Firesheep_add_on?taxonomyId=17&pageNumber=1]

  • How Can I execute an external program from my vi?

    Hi guys,
    I want to execute a external program to use it when i called with a bottom. I want push a bottom and execute the program, like acess direct icon or so.
    Any help?.

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • Executing an external program via menu

    Hello friends at www.oracle.com ,
    this should be simple, but I can't find it on Form Builder help: how can I create a Forms item that executes an external program?
    I need to create a menu option that has to execute Acrobat Reader, and it has to open a file (the system help in PDF format).
    Best regards,
    Franklin Goncalves Jr.

    Check out the 'HOST' builtin.
    host('c:\program files\adobe\acrobat 5.0\reader\AcroRd32.exe c:\activity_rpt.pdf');

  • Execute an external program using Runtime class

    How to execute an external java program using Runtime class?
    I have used ,
    Process p=Runtime.getRuntime().exec("c:/j2sdk1.4.0/bin/helloworld.java ");
    But it throws a runtime IOException error:2 or error:123.
    Help me with the code. Thanks in advance.

    Create Runtime Object and attach to system process.Try this code
    import java.io.*;
    public class ExecuteExternalApp {
      public static void main(String args[]) {
                try {
                    Runtime rt = Runtime.getRuntime();
                    //Process pr = rt.exec("cmd /c dir");
                    Process pr = rt.exec("c:\\ yamessenger.exe"); //give a valid exe file
                    BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                    String val=null;
                    while((val=input.readLine()) != null) {
                        System.out.println(val);
                    int exit = pr.waitFor();
                    System.out.println("Exited with error code "+exit);
                } catch(Exception e) {
                    System.out.println(e.toString());
                    e.printStackTrace();
    }Edited by: anishtomas on Feb 3, 2009 9:34 PM
    Edited by: anishtomas on Feb 3, 2009 9:37 PM

  • Executing an External program from ABAP

    Hi Friends,
    Can we run a C program or any External program residing on different system from ABAP ?
    Please let me know, its urgent.
    Thanks,
    Arshad

    Yes it is possible,need to have RFC Connection
    Check with below Links :
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/9f039a4b9b11d189750000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/9f04624b9b11d189750000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/9f038d4b9b11d189750000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/9f047c4b9b11d189750000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/9f03c14b9b11d189750000e8322d00/frameset.htm
    Thanks
    Seshu

  • Executing a External Program

    Hi People
    I need to call a external program (*.exe) using a trigger. Is it possible? How can I do that?
    Edigar
    [email protected]

    Read up in the documentation about external procedure call.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by edigarjr ():
    Hi People
    I need to call a external program (*.exe) using a trigger. Is it possible? How can I do that?
    Edigar
    [email protected]<HR></BLOCKQUOTE>
    null

  • Execute launch external program with arguments on Windows Mobile

    Hy, i try to *run an external application with arguments* from my MIDlet on Windows ME :
    microedition.platform     intent JTE
    microedition.configuration     CLDC-1.1
    microedition.profiles     MIDP-2.0
    String urlToLaunch = "/Program Files/MyProgram/MyProgram.exe";
    String arguments = "arg1 arg2 arg3";
    String urlToLaunchArgs = urlToLaunch = urlToLaunch+" "+arguments;
    platformRequest(urlToLaunchArgs);The PDA return : Can't open file '/Program Files/MyProgram/MyProgram.exe arg1 arg2 arg3'
    With no argument (urlToLaunchArgs = "/Program Files/MyProgram/MyProgram.exe") it's work fine.
    With arguments (urlToLaunchArgs = "/Program Files/MyProgram/MyProgram.exe arg1 arg2") it doesn't work...
    If somebody have a solution to propose...
    ... or another way/method to explain...
    Thank you.

    > SAPService<SID> and <SID>ADM both have Administrator rights for the server.
    > That means they should have full access.
    No - this is no more true like that since Windows 2008, it's a bit more complex:
    http://en.wikipedia.org/wiki/User_Account_Control
    > Where would you setup the permission/policy to "interact with the desktop"?
    Add the policy using group policy editor (gpedit.msc)
    Markus

  • Execute a external program from other plataform ?

    Hi, I have red, many things, about runtime.exec, but i have installed a Webspehere aplicaction server y try to execute a visual basic aplication. when i do this in the same machine i don�t have any problem, but i want to try from the server (with a JSP) i can�t.
    Someone, has a idea how resolve it..?

    Hi, I have red, many things, about runtime.exec, but i
    have installed a Webspehere aplicaction server y try
    to execute a visual basic aplication. when i do this
    in the same machine i don�t have any problem, but i
    want to try from the server (with a JSP) i can�t.
    Someone, has a idea how resolve it..?Tell us what the problem is. ("I can't" is not quite enough information.)

  • How to execute external program in java?

    My question is how to execute an external program in java.
    I need to call a unix command in java.
    Thanks.

    it depends on what you are trying to do. Following are the two methods
    1. Runtime.exec() : this method allows you just to call an external program as a seperate process
    2. JNI (Native Interface) :- As of right now only C and C++ are supported by this method. This method allows you to directly call the C/C++ methods from JAVA

  • Executing external program

    My java application has a feature in which it executes an external program, which creates a file, then shuts down. That's working great.
    My problem: how can my program tell when the external program is finished executing, so that it can work with the created file?

    Basically you just need to call waitFor on the Process object returned from Runtime.exec. See this article for a more detailed discussion: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Pocket PC -Problem executing external program from java

    Hi,
    I'm developing an application on Dell Axim x51 PDA. I am using mysaifu jvm. The application needs to execute an external program (.exe) for which I'm using the Runtime class.
    I get java.io.IOException: The system cannot find the file specified.
    I have verified that the file exists. ( i used File class to check if the file exists)
    here's the part of code :
    Runtime rt = Runtime.getRuntime ();      
    File sktScan = new File("\\My Documents\\RFID\\ScktScan.exe");
    if(sktScan.exists())
    System.out.println("FILE EXISTS");
    String command = sktScan.getAbsolutePath();
    process = rt.exec (command);
    System.out.println("Socket Scan Path is : "+command);

    You have acces to "java.lang.Runtime currentRuntime.exec()" method ? in my case NetBeans IDE dont give me for my compilation with :
              microedition.configuration     CLDC-1.1     
              microedition.profiles     MIDP-2.0

  • How do I call an external program

    From within my Java program I want to execute an
    external program and dump the output into a string
    or array of strings. In perl this is trivial $a=`dir`.
    How do I do it in Java?
    Thanx,
    Art.

    with Runtime
                try {
                        Process p = Runtime.getRuntime().exec("cmd.exe /c dir");
                        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        String str = "";
                        while((str = in.readLine()) != null)
                            //do what you want to with input
                        in.close();
                    catch(Exception e)
                        e.printStackTrace();
    [/code[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Running external program using java

    hi
    i am trying to run an external program using the runtime.exec() method. my problem is that the external program only runs when i press ctrl-c to exit my program. does anyone know how i can execute the external program while my program is still running without having to quit the program?should i be using threads?
    thanks

    As per the api doc exec will be executed as a seperate process
    Process exec(String command) ------Executes the specified string command in a separate process.
    Can you able to share that code what you have written ?

Maybe you are looking for