"System Exec" command in NT / W95 How to use?

Hi LVers,
I can start the shell with the System Exec command with LV, but how can I put
additional (batch) commandos into it?
I already tried:
- piping "cmd < dir"
- batch files "mybatch.bat"
Where are the differencies btw. NT and W95
thanks
tom

I am not sure that I understand what you are trying to do.
Anyway, in LVWUtil32.zip you can find some VIs that improve the use of System Exec[http://digital.ni.com/public.nsf/3efedde4322f​ef19862567740067f3cc/824b3db43031317686256aaf00713​218/$FILE/LVWUtil32.zip]. As far as I remember you have some good documentation inside.
Also, you can use a KeyGenerator [http://hamiltondesign-consulting.com/ftpfiles/Sen​dKey.zip] to send commands to a shell window (via keystrokes).
Hope this helps

Similar Messages

  • -14001 error occurs from system exec.vi only on one machine

    I have a LV application that calls an executable that is bundled with the application using the System Exec command.
    I have tested it on our computers both pre-compiled and executable with no problems.  It has also worked fine on
    a variety of customer computers.
    But ONE computer from one customer returns a -14001 error.  It is a chinese language XP machine.
    Any info on this error?  Any idea how I might debug it?
    Thanks...
    -Umar.

    Error 14001 LabVIEW: Invalid refnum.
    Is the customer
    doing anything with DDE server, client, or functions? In every case
    that we have seen this error at National Instruments it was when a
    customer is using DDE. What is the operating system? In more than one
    case it was suggested that it was a problem with the operating system.
    In one case the customer said that it ended up beiong a Microsoft issue. You could also try contacting Microsoft and ask them if they can tell you how to set the NetDDE permissions differently.
    Vince M
    Applications Engineer

  • System Exec returns Error code 0xC1

    When I try to bring up a help file (blah.chm) thru system exec,
    nothing shows up on the screen and an error code 0xc1 is returned.
    I tried launching notepad, that works fine. I can launch the chm
    file from a command prompt, works fine also. A chm file is a compiled
    help file, which windows knows how to bring up as an application. Can
    anybody tell me why it may not work like any other windows executables
    via system exec?
    Thanks,
    Ratin

    Here is how I do it. See if it works for you. use this all you want and modify as needed.
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    runapp.vi ‏49 KB

  • System Exec v. Cmd line differences

    From the DOS command line, I can start an external program; tell the program a file to open; and activate some switches.  From system exec, the program can't find or open its open file, althougth the error seems to have the correct file name.  What could be the problem? I've tried all sorts of variations in configuring the LV code.

    The thing you have to remember is that System Exec is really more like using the Start -> Run command. It is not the same as having a command window open. Thus, if you cannot enter a valid command via Start -> Run, then your command will not work with System Exec as is. Usually you can use cmd /c or cmd /k as suggested to get the command window "environment". In some cases you need to resort to a batch file to get it working.

  • How PI uses technical system information in SLD

    Hi Experts,
    I know there are business system and technical system registered and associated in SLD.
    Especially for those SAP systems, in our normal PI scenario, how PI uses the technical information which was registered under Technical System in SLD since we need again configure the host/port and credentials details in the sender/receiver channel in ID.
    Or SLD is just one central place for collecting all the technical information together only for life cycle management?
    There is nothing more to do with the Tech System (SLD), PI only needs the business system in scenario.
    Please knidly share your opnion, thanks in advance.
    Best Regards,

    Hi Aditya,
    Let me provide an example to describe the need fot technical systems.
    Think of an outbound scenario : SAP ECC/CRM -> PI -> Third Party (ex: SOAP)
    Now just think how PI will identify what the sender is (ECC/CRM or 3rd party) if the TS is not registered in SLD? The Business Systems are logical systems whcih points to Technical Systems (application systems that are installed in system landscape). TS hold the information about the actual systems, its host, IP, clients etc.
    Now based on the source BS which points to TS, the target binding is done in Receiver Determination pipeline step. Now if there is no TS attached to the BS how can PI identify whether ECC or CRM is sending the data and hence will not be able to identify the relevant target for the source.
    Think of Business Systems as sitting on top of Technical Systems, and when the landsape details are not known for third party systems we use Business Component/Business Service.
    Cheers,
    Souvik

  • How to use custom calendar for scheduling other than owb's default calendar

    Hi All,
    Can anyone please tell me, is there any possibility of using a custom calendar in place of owb default calendar calendar during scheduling. Because, in my case, the month start date and end date are not 1st and 31st that changes according to the financial calendar that is defined.
    I want to schedule mappings on month end date of financial calendar. How can this be done?
    Thanks in advance
    Joshna

    Hi,
    The only possibility is to configure more than one schedule using the complex by month, by_ configuration. I don't know if this will work for you. Or you must use another job control system.
    Can u just brief how to use it. Any other possible way of achieving my task?
    Thanks
    Joshna

  • How to use Runnable

    Hello All
    I have created a program, but I dont know how to implement Runnable. Ideally, I want this program run in its own thread, so it wont restrict other functions with the the whole system. Can anyone tell me how to use Runnable in my code as below? and what is the difference between Thread and Runnable?
    ================================================================
    public class InterestCounter extends TimerTask implements Runnable
         public InterestCounter() { }
         private int daycount = 0;
         public void run()
              daycount++;
              if (daycount ==3)
    //do something here

    Try this:
    public class InterestCounter extends TimerTask implements Runnable{
         public InterestCounter() { }
         public static void main(String[] args){          
              // Thread the execution of the class.
              Thread myThread = new Thread(new InterestCounter());
              myThread.start();
         private int daycount = 0;
         public void run(){
              daycount++;
              if (daycount ==3){
                   //do something here
    }Your main method will create the thread. The run method is what is executed within that thread.

  • How can I run different commands in the same system exec window?

    I want to open a window (cygwin) on my Xp machine and sent commands within that window. I then have to monitor what the responses are coming back into the window that was launched. Any ideas on how to do this? I have been playing with the system exec VI but can't seem to get it to do what I want. Any help would be appreciated. Thanks - Troy

    Hello,
    Have you tried setting the wait until completion to true on the System Exec VI?  If so, the LabVIEW documentation claims that the parameter "standard output returns information from the program you called if wait until completion is TRUE. If wait until completion is FALSE, System Exec returns an empty string."
    Could this be the answer to the problem of getting the data returned?
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to hide command prompt window when using system exec

    Hello, I'm using the system exec VI to do some file transfers for a LabVIEW application.  I'm worried that the black command prompt window with white scrolling text that pops up when system exec is called might frighten the non-tech savy users of this LabVIEW application.  Is there a way to hide the command prompt window?
    Solved!
    Go to Solution.

    Wire a TRUE to the Run Minimized input.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • System exec, How I say to open one file and make operation in external program?

    Hi,
    I got called an external program with the system exec.vi, but i would like the program open the file saved in the other window, i can get the file path, but how Can I put the file path in the external program and the program open the file and I tell (in this case compile), since i open one file code c and only i must to open and say to the program 'compile' and then close external program.
    Any help?. Thanks.
    Attachments:
    system_exec.GIF ‏8 KB

    Hi Fonsi,
    System Exec.vi will allow you to run commands like launching a program easily but it is difficult and many times not possible to execute commands within an application.
    A better way maybe to approach this though ActiveX. Please look at the following example that uses ActiveX to communicate with Excel.
    Writing Rows to Excel 97 and Excel 2000 Using ActiveX
    If you are not familiar to ActiveX and LabVIEW, please read the document below:
    ActiveX and LabVIEW
    I hope this
    helps.
    Sincerely,
    Feroz
    National Instruments

  • How do you change the directory of system exec after it has ran once in the current vi

    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    Attachments:
    system execute command.vi ‏41 KB

    matt198717 wrote:
    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    I am not sure, if I understand exactly the problem, but do you really need the cmd /c start some_executable.exe. This executes a command prompt window, which executes another command prompt window, where your executable runs.
    You can just use cmd /c some_executable.exe some_parameters_if_needed, and you don't need any quotation marks, even if the executable has command line parameters. I you want that the executable runs in particular directory, wire this path to the 'working directory' of System Exec.vi

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends:
    I met a problem when I want to use a Java program to run other java processes by Runtime.exec command,
    How can I run Runtime.exec command in Java To invoke several other java processes??
    see code below,
    I want to use HelloHappyCall to call both HappyHoliday.java and HellowWorld.java,
    [1]. main program,
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloHappyCall
         public static void main(String[] args){
              try
                   Runtime.getRuntime().exec("java  -version");
                   Runtime.getRuntime().exec("cmd /c java  HelloWorld "); // here start will create a new process..
                   System.out.println("Never mind abt the bach file execution...");
              catch(Exception ex)
                   System.out.println("Exception occured: " + ex);
    } [2]. sub 1 program
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloWorld
         public static void main(String[] args){
         System.out.println("Hellow World");
    } [3]. Sub 2 program:
    package abc;
    import java.util.*;
    import java.io.*;
    class HappyHoliday
         public static void main(String[] args){
         System.out.println("Happy Holiday!!");
    } When I run, I got following:
    Never mind abt the bach file execution...
    I cannot see both Java version and Hellow World print, what is wrong??
    I use eclipse3.2
    Thanks a lot..

    sunnymanman wrote:
    Thanks,
    But How can I see both programs printout
    "Happy Holiday"
    and
    "Hello World"
    ??First of all, you're not even calling the Happy Holiday one. If you want it to do something, you have to invoke it.
    And by the way, in your comments, you mention that in one case, a new process is created. Actually, new processes are created each time you call Runtime.exec.
    Anyway, if you want the output from the processes, you read it using getInputStream from the Process class. In fact, you really should read that stream anyway (read that URL I sent you to find out why).
    If you want to print that output to the screen, then do so as you'd print anything to the screen.
    in notepad HelloWorld.java, I can see it is opened,
    but in Java, not.I have no idea what you're saying here. It's not relevant whether a source code file is opened in Notepad, when running a program.

  • How to add simple path in exec command??

    Hello friends...want some help on "How to add simple path in exec command?"Because on linux each time username changes I will have to change username in exec command.Please help me.
    My code for java on linux is
    Runtime r4=Runtime.getRuntime();
                                       Process p4=null;
         //     "oofromtemplate" is command name for openoffice on linux                    //my username on linux is "sandy"     
                                       try
                                       p4=r4.exec("oofromtemplate /home/sandy/complete/Output.html");
                                       catch(Exception ae)
                                       System.out.println("error");
                                       }

    System properties yield among other things:
    user.name       User's account name
    user.home      User's home directory
    user.dir      User's current working directory

  • How does System Exec VI identify Standard Error within cmd code?

    I am using the System Exec VI to control a USB to serial adaptor program header, I have sucessfully written a .BAT file to call the CMD commands (the .exe I am running uses "-option" commands and the help file reccomends to do so) and it functions perfectly. My only issue is identifing errors. The "Standard Error Out" on the System Exec VI never outputs anything. Yes the wait until completion is TRUE and my standard output functions fine. I am curious as to how the System Exec VI  identifies errors from the command prompt and  why my errors are not showing up. I am currently using multiple match pattern string functions to identify the possible errors from my standar output for the time being but I would like to simplfy my code a bit and clean it up if at all possible. Not to mention there are most likely several other errors that could occur that I may have not identified. Some examples of stanadrd output errors i can get include include:
    {C:\Documents and Settings\owner\Desktop\RACK LINK>C:\DCRABBIT_10.66\Utilities\clRFU.exe "" -s "0":115200 -v -vp+ -usb+
    .bin not found
    C:\Documents and Settings\owner\Desktop\RACK LINK>pause
    Press any key to continue . . . }
    or
    {C:\Documents and Settings\owner\Desktop\RACK LINK>C:\DCRABBIT_10.66\Utilities\clRFU.exe "C:\Documents and Settings\owner\Desktop\RACK LINK\Calibration_v030.bin" -s "4":115200 -v -vp+ -usb+
    Rabbit Field Utility v4.62
    Installing Calibration v0.3.0
    Sending Coldloader
    Error: No Rabbit Processor Detected.
    C:\Documents and Settings\owner\Desktop\RACK LINK>pause
    Press any key to continue . . . }

    I think you should use error handling in batch programming, see this link http://www.robvanderwoude.com/errorlevel.php
    CLA 2014
    CCVID 2014

  • How use System exec.vi...

    hi,
    i want to run a shortcut from a labview application. i know the command line to do this from MS DOS but i don't understand how works System exec.vi.
    Could you help me giving some example?
    Thank you

    Use the command "start <path to shortcut>", or "cmd <path to shortcut>", as explained in this document.
    Message Edited by smercurio_fc on 06-08-2007 09:46 AM

Maybe you are looking for

  • EHP Upgrade - Trying to understand the concept

    Dear experts, this is an effort to understand the concept. I have been doing Basis work for the past 10 years approximately. All along, I have been doing the typical LCP and SP upgrades way back from legacy systems until now (ECC 5.0 / BW 3.5). We ha

  • Help Please!  Chemo patient needs to walk and iPod not working

    iPod Nano (4th or 5th gen) operates perfectly and battery is fully charged when plugged into the Mac, but as soon as I disconnect, can't get it to turn on.  Is not in hold position and also tried reset.  Any ideas?  Thanks much!

  • White screen when playing mpeg4, sound ok

    I have downloaded the latest version of QT and updates. I have two types of MP4 files I want to play, one is a movie format that my Olympus compact films in, and the other is a video podcast downloaded from the BBC. When I try to play either, I just

  • Mod function in java

    Hello everybody, I need help on mod fuction in java, but I don't know how can I use it, if you know how use it, please give a little example...thanks..

  • Phonebook/Contacts app for MW1 Smart Headset Pro

    Hi, I would like to see an app to reach contacts on my Android phone from my Smart Headset Pro. There is an app named Phonebook for Smart Extras but that is for Smartwatch and does not work on Smart Headset Pro. At least an app to rach favourite cont