Calling an .exe  from a webserice

Hi,
I have the following requirement.
Develop a webservice that makes a call to an .exe program running on a server. The exe program when called would return with some output based on the input request made.
Just wanted to check if this is possible and if yes, how will that be done
Thanks in advance
Shekar

should be possible, if the webservice is running on a webserver with really shitty security settings that allows servlets to run any code on the system.
Would like to see you stop someone calling "format c:" though, or similarly destructive commands...

Similar Messages

  • Calling  r25con32.exe  from the command prompt

    how to call r25con32.exe from the run prompt.

    Duplicate:
    Calling  r25con32.exe  from the command prompt
    :)

  • Calling startrfc.exe from within a vbs script

    Hello, can someone help me please
    I am trying to process xml idocs into SAP on a Windows 2008 server. I have written a vbs script to process the file and am trying to call STARTRFC.EXE from within the vbs script. However I keep getting an error that it cannot open the file. The code is shown below. I have changed the server name and gateway and user/passwd for security. I'm passing the filename as a variable (str_expfile) but it does not seem to be able to extract the actual file name from the variable. I know from past experience that you can pass it variables if its running on a unix box and in a shell. But for some reason it not decipering the variable name in the vbs script
    Set objShell = CreateObject("Wscript.Shell")
    str_startrfc = "D:\usr\sap\SID\SYS\exe\uc\NTAMD64\startrfc.exe -d SID -3 -h hostname -s 00 -g hostname -x sapgw00 -u user -p passwd -c 100 -l EN -t -F EDI_DATA_INCOMING -E PORT=MYPORT -E PATHNAME=str_expfile"
    objShell.Run str_startrfc, ,True
    The error I'm getting is shown below:
    ERROR file opened at 20110510 134219 GMT Daylight Time, SAP-REL 700,0,278 RFC-VER 3 1200864 MT-SL
    T:2584 Error in program 'startrfc': ======> Error at OPEN 'str_expfile' (check file)
    T:2584 Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    T:2584 Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
    Thanks
    Regards
    Steve

    Hi Markus
    Unfortunately I can't do that because I need it to process hundreds of files one after another and I would have to hard code the file path each time. That's why I need it automated.
    Can startrfc.exe not take a variable for the pathname in a vb script? It works fine in a unix shell. We are migrating from unix to windows and I need to convert all my unix scripts into vb scripts.
    I notice there is a nother rfc type program available, can I use rfcexec.exe instead of startrfc.exe and would it take variables?
    Thanks
    Regards
    Steve

  • Calling an EXE from Forms 4.5

    How do i call a windows Exe from forms. Whats the exact syntax to do that? Code sample would help.
    Thanks!

    Client/server mode calling an EXE from Forms 4.5
    The following is a Foreign Function Interface that I employed to launch an outside program in its own asynchronous window. It was a great alternative to the HOST command.
    The disadvantage to the HOST command was that the launched program would have to be closed before you could return to the form. With this method the the launched program
    could be minimized etc. and you could switch back and forth between forms and it.
    ===============================================================
    PACKAGE fp_winexec IS
    FUNCTION run(p_cmd IN OUT VARCHAR2)
    RETURN BOOLEAN;
    END;
    PACKAGE BODY fp_winexec IS
    dll_handle ORA_FFI.LIBHANDLETYPE;
    winexec_handle ORA_FFI.FUNCHANDLETYPE;
    FUNCTION RunICD(
    handle IN ORA_FFI.FUNCHANDLETYPE;
    cmd IN OUT VARCHAR2;
    disp_mode IN PLS_INTEGER)
    RETURN PLS_INTEGER;
    PRAGMA INTERFACE(C, RunICD, 11265);
    FUNCTION run(p_cmd IN OUT VARCHAR2)
    RETURN BOOLEAN IS
    v_tmp PLS_INTEGER;
    v_cmd VARCHAR2(2000) := p_cmd;
    v_retval BOOLEAN := TRUE;
    BEGIN
    v_tmp := RunICD(winexec_handle, v_cmd, 1);
    IF v_tmp = 2
    THEN
    MESSAGE('Cannot find '||v_cmd||' or one of its components);
    v_retval := FALSE;
    END IF;
    return(v_retval);
    END run;
    BEGIN
    dll_handle := ORA_FFI.REGISTER_LIBRARY
    (NULL, 'krn386.exe');
    winexec_handle := ORA_FFI.REGISTER_FUNCTION(dll_handle, 'WinExec', ORA_FFI.PASCAL_STD);
    ORA_FFI.REGISTER_RETURN(winexec_handle, ORA_FFI.C_INT);
    ORA_FFI.REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_CHAR_PTR);
    ORA_FFI_REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_INT);
    END;
    ====================================================================
    -- To call the program from forms
    DECLARE
    v_retval BOOLEAN;
    BEGIN
    v_retval := fp_winexec.run(:control_block.program_to_run);
    END;

  • Calling calc.exe from APEX

    Hi,
    I am wondering if there is any functionality(OS commands) which can be used to call local machine executables (like calc.exe for calculator, charmap.exe for character map, notepad.exe for notepad etc) from an APEX page.
    Regards,
    Rakesh

    Hello Rakesh ,
    >> like calc.exe for calculator, charmap.exe for character map, notepad.exe for notepad etc
    I don’t have direct answer to your question (although if you search this forum you’ll probably find one) however all the features you mentioned in your post can be implemented using built-in APEX items, e.g. ‘text field with calculator popup’ item or ‘HTML editor standard’ textarea item.
    Regards,
    Arie.

  • Call iexplore.exe from apex page

    I have a requirement to have a link from my main application apex page to invoke a client windows os command 'iexplore.exe -noframemerging' (I think this ie option used to be -nomerge). The idea is, this will fire up a separate IE8 session in a separate browser session, thus partitioning it from any other IE sessions. I know in IE8 there is a 'New Session' menu option but we need a link that is more obvious/integrated within our application. Our idea is to "persuade" users to click this link in preference to 'New Tab' or 'New Window' option.
    Now, my quandary is how to do this. Should I be calling a Java Applet from the page (via Javascript) but is this "sand boxed" and thus will not let me call an executable for security reasons ?
    Obviously I would also like to cater for users running Firefox (which I presume could detect in javascript and pass the browser type into the applet).
    Is this sane, Is there any other way ?
    Any advice would be appreciated or has someone already been down this road and could give me some pointers or an example.
    Thanks in anticipation.

    Our corporate application already has calls to similar executables (ie MS Word, Excel) to do letter merges, document transfers etc using signed Java libs on the backend server. I suppose this requirement is different as I'm wanting to run an executable on the client pc. So, are we saying it is not possible to run an 'iexplore.exe' on the client PC (using a signed Java applet) ?
    Edited by: theArrow on Apr 11, 2011 1:20 AM
    Edited by: theArrow on Apr 11, 2011 4:52 AM

  • Calling Winrar.exe from Execution Process Task by Passing Arguments

    Is any body having knowledge please let me know how to pass the arguments to winrar .exe to create a zip file from the Execution Process Task  in SSIS

    Should be something like:
    unrar x c:\yourfile.rar *.gif c:\extractfolder\
    Executable: C:\Program Files\WinRAR\unrar.exe
    Arguments: x c:\yourfile.rar *.gif c:\extractfolder\
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Calling AcroRd32.exe from external programs

    what is the format for running this program from dos command and opening a file. How do I pass the filename to the program.

    Why do you want to use the command line rather than a supported
    interface?
    Aandi Inston

  • Call exe from an exe

    hello
    How we can call an exe from an another exe.
    If the exe installed in a PC, it had not LabView and whatever files or drivers needed.
    I create a dll file. call functions node used to call the dll. But it is not calling the dll
    please give a solution for this 
    Thank you 
    "Thanks with regards "
    by
    ..........Gireesh..........
    Solved!
    Go to Solution.

    smercurio_fc , Attaching the ver 8.0 files.
    Gireesh, If you want that to run then you must have 8.2 runtime engine.
    As smercurio_fc said we use System Exec VI to run exe or any other kind of programs & we don't need any DLL. Shared variable is the person who can communicate between two different exe.
    You can have look at the sample code if you have LV 8.0.
    Attachments:
    Untitled Project 1 Folder.zip ‏33 KB

  • Call c++ program .exe from java

    Hello every body
    i have a problem while calling Hello.exe from java
    c++ code
    #include "stdafx.h"
    #include <iostream>
    # include <string>
    using namespace std;
    int main(int argc, char *argv[])
         int x;
         cout<<"Just test ";
    return 0;
    }java code:
    import java.io.IOException;
    public class runtime{
        public static void main(String[] args){
        try
        Process process = Runtime.getRuntime().exec("Hello.exe");
        }catch (IOException e)
         e.printStackTrace();
    }it display nothing!!

    alexxzius wrote:
    String line="";
    BufferedReader input =
    new BufferedReader
    (new InputStreamReader(process.getInputStream()));
    while ((line = input.readLine()) != null) {
    System.out.println(line);
    There is a danger of deadlock in this code. The OP should read the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and implement ALL the recommendations.

  • How to call Exe from labview?

    Hello NI,
                        I want to call the exe from the labview.  presently i am using command.vi to open the exe. but it works only with source code. after creating the exe it doesnt work.
    I checked the path of exe.
    do you have any solution for this?  
    Regards,
    Balaji DP

    Working directory should be c:\windows\system32
    copy your winword.exe into that system32 folder and just try this
    Message Edited by mathan on 01-06-2009 03:24 AM
    Attachments:
    untitled.PNG ‏3 KB

  • Calling Exe from Servlet

    I need to call 1 exe from a servlet. I tried giving <FORM ACTION="Path for that Exe">
    But its not working. Can't I call exe or any other file other than .class file ?
    Help me out.

    I need to call 1 exe from a servlet. I tried giving
    <FORM ACTION="Path for that Exe">
    But its not working. Can't I call exe or any other
    file other than .class file ?
    Help me out.Here goes my Code
    import java.io.*;
    import java.util.Hashtable;
    import java.util.Date.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * Date Servlet
    * This is a simple servlet to demonstrate server-side include
    * It returns a string representation of the current time. And also client IP and Name
    * @author
    * 16 Oct. 2003
    public class PrintDate extends HttpServlet{
         public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException{
              response.setContentType("text/plain");
              PrintWriter out = response.getWriter();
              //ServletOutputStream out = response.getOutputStream();
              String host = request.getRemoteAddr();
              //out.println("I am printing the host:" + host);
              out.println("<HTML>");
              out.println("<HEAD></HEAD>");
              out.println("<BODY>");
              out.println("<FORM METHOD=get ACTION=/servlet/Kudremukh_pan>");
              out.println("<INPUT TYPE=text SIZE=15>");
              out.println("<INPUT TYPE=submit VALUE=submit>");
              out.println("</FORM></BODY></HTML>");

  • How to open exe from j2me

    Please tell me how can i call my exe from j2me side
    thanks in advance

    {color:#000080}You can't.
    db{color}

  • How to call a exe or bat file from java program

    hi,
    i actually want to know that how to call a exe or bat file from program so that i can run them parallely.

    Try this :
    String strCmd = "myFile.bat";
    try
         Runtime rTime = Runtime.getRuntime();
         Process process = rTime.exec(strCmd);
         InputStream p_in = process.getInputStream();
         OutputStream p_out = process.getOutputStream();
         InputStream p_err = process.getErrorStream();
         p_in.close();
         p_out.close();
         p_err.close();
    catch(Exception e) {
         throw new Exception("Unable to start, "+strCmd);
    }

  • How do I call another exe file from a Java program?

    Hi,
    I am doing a simple IDE (text editor/interpreter) for a simple programming language we are developing. It will be submitted as our project for this semester. I created an exe file (in C) which will be used as the interpreter. How do I call the interpreter from my IDE? The interpreter should run when the user clicks a button (i.e. the "Run" button). I've tried the Java Runtime class but it doesn't work. Anyone who knows how to do it?
    Thanks!

    I first tried to do a simple program that calls system commands such as dir, cd <dir>, etc.
    I do not have the exact code right now but as far as I can remember, here's what I wrote:
    class Sample{
        public static void main(String args[]) throws IOException{
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           String command;
           while ((command = in.readLine()).equalsIgnoreCase("exit") == false){
              try{
                Runtime.getRuntime().exec(command);
              }catch(Exception e){
                 System.err.println("Error: " + e);
          System.exit(0);
    }

Maybe you are looking for