Call DOS-based exe file

Hi,
I have a DOS-based EXE file. When run it at DOS command window, it needs input 2 parameters at two rows respectively.
Now I want to call this exe file in Labview, How do I do?
I tried System Exec.vi, but I dont know how to pass the two parameters in the "stand input".
Detailed, my dos-base exe file runs at DOS command window like this:
c:abc.exe (click carriage return)
Input parm 1: a1
Input parm 2: a2
In the "command line" of the System Exec.vi, I can put "abc.exe", but how I can put the two input parameters "a1" and a2 at the standard input.
Thanks.
RED

Thanks for your reply. But I still can not pass the two parameters in "command line" of System Exec.vi. For example, in the command line I put "abc.exe a1, a2", the DOS window was opened, still prompting me input a1, a2. Then another strange thing happened, when I input a1, a2, the DOS exe file seems not execute and quickly returns to Labview panel.
Do you know what should I do?
Thanks

Similar Messages

  • Executing Dos-Based Exe files in java

    Dear Friends,
    I have a plm with running dos based exe files (ping,su)in java through exec method.
    My code is
    try{
    String prg="c:\java\ExePrograms\ping";
    Runtime rt=Runtime.getRuntime();
    Process p=rt.exec(prg);
    }catch(Exception ex){
    System.out.println(ex);
    when i run this program, no error message is displayed and not the ping program is run.But when i run i window based exe program,it runs fine.
    plz tell me,what the plm is.

    I try to run su.exe prgm through Runtime.exec()method.Su should prompt the user for login name and password and create a security configuration file in the specified directory.To achieve this,i use the following code
    ==============================
    // OS: win98
    //Java version:1.3
    try{
    Runtime rt=Runtime.getRuntime();
    Process p=rt.exec("command.com /c c:\\startSU.bat");
    p.waitFor();
    }catch(Exception ex){
    System.out.println(ex);
    ===============================
    startSU.bat contains the following code
    c:\Progs\su.exe -f * -Cg c:\user\secure.sec
    when i run this prgm, su window opens but it is empty.It does not prompt the user for login name and password. how should i pass these date to su.exe prgm. plz help me to run su.exe.

  • Call browser based css file in Design Manager master page

    I created a sharepoint 2013 master page from design manager and now i want to add a reference file to call a css file when the site is opened in internet explorer 8,i called the css file in my master page as below
     <!--[if IE 8]>
      <link  href="/Style Library/MyProject/css/mydefaultstyle-ie8.css" rel="stylesheet" type="text/css"/>
    <![endif]-->
    but when i open the site in internet explorer 8 ,i does not load the above css file,can anyone point me to the right direction how i should call the css file for certain browser like internet explorer 8 in master page which is created through design manager 

    Check if below helps
    http://jussionsharepoint.com/targeting-multiple-browsers-and-devices-in-sharepoint-2013-using-device-channels/
    <!--[if IE 7]>
    2: <link rel="stylesheet" type="text/css" href="/_layouts/JussiOnSharePoint/IE7hacks.css"/>
    3: <![endif]-->

  • How to call visual basic exe file from LABVIEW 7.1

    Hi all,
    I would like to call a visual basic 6.0 application(executable file) from labview 7.1 kindly anyone is having code or papers send me.
    Thanks and Regards
    rajesh

    Hi all,
    i would like to run a visual basic programme from labview , i have attached my file , even though iam executing the programme iam not able execute the vb file , kindly suggest me ,
    Regards
    rajesh
    Attachments:
    active x.vi ‏18 KB

  • How to include and call exe file in jar?

    Hi, I am writing a Java application that calls an external exe file to accomplish some tasks. In order to make the program more user friendly, I would like to package the Java application and the exe file into one JAR file and distribute that JAR file to users. I tried to package all these files by running the following command:
    jar cmf manifest.txt java_class_file exe_fileThe manifest.txt contains only the following entry:
    Main-Class: java_class_fileHowever, when I execute the program with java -jar bundle.jar, the JVM complains that it cannot find the exe file. (Everything works fine when I run the original class file with java)
    Would anyone kindly teach me how to do this?
    Thanks in advance!

    You cannot call an exe file in a jar.
    You can have the jar unpack the exe and then run it however.

  • Call the exe file

    Hello Friend
    I am using apex 3.1.
    I want to click on the button then call the webcam exe file.it is possible in oracle apex.
    regard
    vikas nagawade

    Hi,
    I think you have ask similar question before
    It's possible to attach scanner machine
    Did you try search on this forum?
    Naviagation Bar Entries: Adding a link that Runs a local program (OSK.EXE)
    Regards,
    Jari

  • How to control (the input and output) EXE file after I call it using exec?

    Hi,
    I knew that I can use runtime.exec() to call one EXE file, and this works. But this EXE has two characteristics:
    1. After this exe starts, it asks user to input number such as 1 or 2 onto computer screen, then press return. Then the exe will start the calculation.
    2. after it starts calculation, it prints 3 columns of numbers onto the screen.
    My two questions are:
    1. How to use java to input the number such as 1 or 2 automatically? this EXE can not work like this in DOS command line:
    C:> file.exe parameter
    The parameter is the number such as 1 or 2 that I wanna input.
    2. how to redirect the 3 columns of numbers from computer screen to txt file?
    My colleague can solve these two questions using Mathematica. So I know that definitely there is at least one solution for it. I just can not do it using Java. This wierd exe file bothered me a lot and I really wish that I can get help from someone in java community.
    Thank you!
    Tony

    When you call Runtime.exec, you get a Process object. (I presume something similar happens when you use ProcessBuilder.) Process has methods with names getOutput, getInput, and getError. These correspond to the standard input, standard output, and standard error streams of the spawned process.
    You can read and write to the process on the streams corresponding to input and output that the process writes to the console.
    [add]
    In fact, you should be grabbing and reading the output/error streams anyway, because of the points raised by the Traps article. Google "Java Runtime exec traps" and you'll probably get a link to this JavaWorld article, which describes common Runtime.exec problems and how to solve them.
    Edited by: paulcw on Jun 15, 2010 4:09 PM

  • Calling an external program (*.exe file) on the client

    Hi,
    I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client.
    So it should be something like a mixture between host and client_host(webutil) command. Is it possible to use client_host where a virtual path is passed to?
    Regards Sören

    Are you saying you want to run on the exe on the client but its located on the server???
    In that case you would have to do a webutil file transfer to move it to the client before executing. Or, if you are calling a DLL, webutil will download it automatically from the server to the client (see the C API example on the webutil page).
    Regards
    Grant Ronald
    Forms Product Management

  • Include and call an .exe file inside my jar file

    Hi.
    I want to include an exe file and call it inside my jar file. this is the code.
    InputStream is = getClass().getResourceAsStream("/native/my.exe");
              int[] line = new int[is.available()];
              File myFile = File.createTempFile("my","exe");
              myFile.deleteOnExit();
              myFile.setExecutable(true);
              FileOutputStream out = new FileOutputStream(myFile.getAbsolutePath());
              int i = 0;
              int c;
              while((c=is.read()) != -1){
                   line=c;
                   i++;
              is.close();
              for(int j= 0;j<line.length;j++)
                   out.write(line[j]);
              out.close();
    So i store it in my temp folder. Than i run
    String myFileLocation = myFile.getAbsolutePath();
    p = rt.exec(myFileLocation);
    Everything goes fine, but the behaviour of the .exe file is not the same. I mean when i run the commands
    PrintWriter writer = new PrintWriter(p.getoutputStream());
    writer.println("command");
    the behaviour is not the same. What goes wrong.

    But to load the xml file I need to create a File objectIf this is true then you will not be able to load the XML file, since a jar entry is not a File object and cannot be represented as one.
    However if you get rid of whatever it is that loads your XML file and replace it by more standard JAXP processing, you should be able to parse an InputStream that reads from the jar entry. You know how to get that so it should not be a problem.

  • 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);
    }

  • Calling a function in an EXE file from Java Program

    Hi Im having a function which is written in c program.i need to call that function from my java program, if i create a shared library (DLL) for my C code then it works but my requirement is i dont want to create that DLL , like in it would be an executable and my java code should access that function in that C program

    I understand the usage od a DLL but the thing is if i convert the exe to a DLL
    the server doesnt start at all so what i need is that i dont want to change
    that .EXE into a .DLL,let it be an executable. that executable is in running mode
    and through my java program i need to call a function in that EXE file.
    Is ther any way to do it?Nope, but you have another problem: why can't you separate your server program
    into a .dll part and a startup part? Both, when properly linked against each other
    should give you an executable file.
    kind regards,
    Jos

  • HT3702 I purchased a book called Activity-based costing for $3.99. I tried to open the file but it said my computer does not have IOS. I have a smartphone and I am unable to view the book. I am requesting since I am unable to use the book activity-base co

    I purchased a book called Activity-based costing for $3.99. I tried to open the file but it said my computer does not have IOS. I have a smartphone and I am unable to view the book. I am requesting since I am unable to use the book activity-base costing, a refund.
    Kevin

    I don't know what you are saying. How do I get my money refunded.

  • Open .exe File (windows based)

    How to open an .exe file (windows based) from Form6i?

    What do you mean "open" - if you want to run a program .exe then use the HOST() built-in

  • I wants to call .Exe file from Java Programme

    I wants to call .Exe file from Java programme. Please give answer with example. This very urgent. Help me

    hi
    u can use Runtime.exec() method in java.lang package
    to execute exe files
    regards
    pnp

  • Calling .exe File

    In C , Using System Command we can call an .exe file
    eg:System("c:\sample.exe");
    Like this,Is there is any Way to Call an .Exe File
    from Java Programming

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Maybe you are looking for

  • Hack attempt by a certain user I know

    Hey everyone, I thought it'd be fair to share this information I know just in case that person attempts to hack into other skype user's account. So basically this guy from my contact list has been trying to send me a picture for a while (name is Fre*

  • When trying to install itunes on windows 7 i got a configuration data for this product is corrupt?

    It is not allowing me to install, it gives me the error: configuration data for this product is corrupt. How do I install itunes on my windows 7? Trying to update my ipad....but I first need to install itunes!!

  • Module config : XML2PLAIN in the receiver file adapter :

    Hi All, I am facing a problem in using the Module XML2PLAIN in the receiver comm channel configuration. I am using the same parameters in the another receiver and is working fine,but when I use it another on eit is not working.(and is working fine if

  • Detaching audio from video clips

    Hi After trying the standard 'detach audio' button I cant seem to find a way to completley detach audio from a clip in order to hear the track I have added to the clip. All I can seem to do is turn the volume right down, and inturn still able to hear

  • Center Button Will Not Work???

    Hi everybody, Here is my problem: my select/center button on my 3rd generation iPod nano is not working. I went to itunes on my computer, and clicked restore, now on my iPod it's stuck to the language setting. What do I do? Message was edited by: Nic