System exec cmd window

Hello, first time posting a question!
I have spent a good while trying to find an already posted answer to this, and looking on the wider web, hope i have not just missed it.
I am using XP Pro SP3, LV 8.6.
I am not very familiar with Windows command lines and structures etc. 
I am using the System Exec VI to start a third party piece of software. I have wired the path in to the path input, and if i wire cmd /c start xxx to the command line terminal the VI will run and start the software application (xxx.exe). As the VI executes the cmd window clunks open and closed. If i run the VI without the cmd /c part of the command then an Error 2 is returned (as widely reported by others).
Is it possible to open an application without the cmd window opening and closing?
Using the System Exec VI it is possible to open NotePad just by wiring 'NotePad' to the comand line terminal. Is it possible to place the third party software somewhere, or register it with the OS somehow so it could be started in the same way as NotePad (i.e. without the cmd window flashing up)?
Thanks...
Blue 
Message Edited by BlueTwo on 09-25-2008 09:22 AM

Hi Thoric, thanks for the suggestions, Success!
I tried the True boolean to the Run Minimized, but it did not help.
Changing the Environment Path string to include the path to the directory containing the application did work (once i had worked out the syntax).
On to the next problem....
Cheers,
Blue 

Similar Messages

  • System Exec+ "CMD /C START DESK.CPL" won't work--why?

    I've seen previous posts stating that the System Exec is the equivalent of the run box in windows (explaining why you can't execute commands like "dir").
    However, I can run a line like this...
    CMD /C START C:\WINNT\SYSTEM32\DESK.CPL
    or
    CMD /C START C:\WINNT\SYSTEM32\NIPORTS.CPL
    ..from the run menu, but not with System Exec+. CPL files of course are executables that load in the control panel and a WinNT shortcut will not show you the path.
    The workaround is to create a batch file on the fly and execute the text above (since porting the application to a different computer means there might not be an existing batch file). The batch file looks like:
    @CMD /C START C:\WINNT\SYSTEM32\DESK.CPL
    @EXIT
    I don't like having to generate a batch file inasmuch as it does get the job done, there is still the clunky dos box that flashes onto the screen for a brief second. Does anyone know what causes the above discrepancy? ...why it will run from the windows run box, but not with System Exec+? I'm guessing it has something to do with using the START command but I have never had to use it before in this fashion. Any ideas?

    Arg! You're right!
    I originally tried this with NIPORTS.CPL and used DESK.CPL in the above example (without testing it) because everyone has desktop properties but not necessarily the port properties for the E-NET/RS-485 converter. I'm guessing there was a spelling or path error somewhere that wouldn't let my original attempt execute--it works now.
    Also: I didn't realize that any time you execute CMD that it will show a dos box, not just for batch files. Oh well...
    Thanks for your input...

  • Launch expect from System Exec.vi

    I tried using System Exec.vi to run some expect scripts but got an error message saying "tclsh80 generated errors and will be closed
    by windows. You will need to restart the program".
    I use window 2000 and tclsh80 with expect-5.21.
    Under the command line in System Exec.vi window. I put "path\tclsh80.exe" "path\test1.tcl".
    Thanks in advance.
    -Kevin

    Hi Kevin -
    As the error message indicates, it seems to be a problem with your TCL script. Can you run this guy independently of your LabVIEW program? Can you run any TCL scripts? I would try to trim down the current script to its simplest form and work your way back. There are several posts on DevExchange (exchange.ni.com) about using TCL & LabVIEW together,
    you might want to follow their suggestions. There is nothing incorrect about your approach, System Exec literally hands over operation directly to the OS.
    good luck
    ben schulte
    national instruments

  • I am trying to use system exec vi to opens system 32 cmd.exec to do a net send over a windows nt network

    Is there a way to easily send strings over a local nt network, I am trying to use the net send command in windows nt cmd.exec using the system ecec vi, if anyone has any idea how to do this or more info on using the system exec vi in labview 6i. any info would be a big help
    thank you
    dale

    Yes it worked fine thank you, as long as I have your attention I noticed on one of your replies to a different question that you had written a vi that sends e-mail I was wondering if you could post me some info on this or any other communication vi's. just to let you know what I am doing " I am a summer student for electronics, and I have been given labview to write a program that monitors analog and digital channels and alerts a user if any "alarms vary" I am trying to notify the user of these changes by network, email, and pager. thanks to your last answer I have the network idea working.."
    thanks for your help thus far it makes learning these labview apllcations easier
    Dale Walker

  • Windows system exec error in application causes app to crash

    The basics:
    LabView 11.0 (32-bit)
    Windows 7 enterprise
    Because I have to control an elevated app I run my built app elevated on a Win7 64 machine.
    I have an application that uses the system exec.vi (attached) to get a portion of the arp table. When I run this in development it works great. However when I build an app and run it this vi causes the app to be unstable and crash.... sometimes. I have a troubleshooting vi that I wrote that I place at the start and end of vis. This puts a log file on my desktop so that I can trace where it crashes. I've attached the log as well.
    Basically we have a power controller that we control by Telnet but 1st I have to get the IP. I have the MAC of the controller which is DHCP but not the IP. To get the IP I fill the ARP table and search it for the MAC.
    get ARPCache.vi throws the error messaage: System Exec.vi . Command was "cmd /c "arp -a | find "192.168.120"" but only in the built app.
    Update: While getting more info to complete this post I did a build where I changed "get ARPCachs.vi" to show when called so I could see the error cluster. Now it pops up but no errors. hmmm
    Norm
    Attachments:
    get ARPCache.vi ‏22 KB
    Log program message start finish.vi ‏24 KB
    Program Log.txt ‏2 KB

    It depends on how the exe deals with the arguments. Some do honor escape characters, some not.....
    Afaik, there is no difference regarding the System Exec in development environment vs. exe. But it is possible, that these are executed using different user rights?
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • 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.

  • CMD.exe is still running after System Exec.vi

    Hi,
    I'm currently trying to use the System Exec.vi to launch files and applications by writing the action to do in a constant bat file and calling this bat file( to avoid synthax problems). I've remarked that a cmd process is active while the file or application launched previously is opened. It uses more CPU and sometimes disables the new cmd command passed.
    I've already tried to change the wait until completion constant but, in every case the cmd process only stops when we stop the process it had launch.
    I'd like to know if it's possible to avoid this multiple cmd by killing ther cmd window after it has complete its task?
    I'm looking forward to your answer.
    Thank you in advance.
    Bim

    Please see the link below:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=79683&requireLogin=False
    It should solve your problem
    Regards,
    Sanaa T
    Sanaa T.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> http://www.nidays.fr/images/081110_ban_nidays09_468X60.gif

  • 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

  • Using Labview's System Exec.vi, is there any way to send multiple standard inputs to the same executeable console? Or is there a way using Labview to target the window for the executeable and send commands to it at will?

    thanks

    One suggestion is to write a batch (.bat) file that will call your executable. The batch file can contain all the standard inputs necessary to run the executable. Then, in LabVIEW, you can call the .bat file using the System Exec.vi.
    As far as your second question, there is no slick way to do this LabVIEW. You would probably have to call Window API functions using the Call Library Function utility. There is a set of VI's that call some of the standard API functions but I don't think they have what you want.
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&74DDE683A1AFF6988625683A000C0D73&cat=034E59A8530E09DF862568900018707A
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Displaying getRuntime().exec() Process CMD Window

    Hello,
    I'm using Runtime.exec() to run some Windows XP SP2 command line arguments from the command prompt, namely, an ftp client. The code looks something like:
    Process p = Runtime.getRuntime().exec("cmd /c \"cd this && that.bat -script script.txt\"");
    Now, this works, but I want the command prompt window to pop-up, so that the user can see the process running (it is a long process).
    How can I achieve this?

    Now, this works, but I want the command prompt window
    to pop-up, so that the user can see the process
    running (it is a long process).
    How can I achieve this?It is easier to capture the process stdout and display it in a Frame or JFrame.

  • 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

  • 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

  • Close a notepad window in labview after opening it with system exec

    Is there a way to close a notepad window within Labview after opening the window using the System Exec function?
    Also can Labview send characters to Notepad so they show up in its window?

    You can send a quit message to another window by using one of the VIs in a collection of windows interaction VIs called winutil32 (or something similar), but you will have to know the window name. Try searching for it on this site.
    You could probably also use the windows PostMessage function to send characters to another window, but that would require learning how to work with DLLs in LV, reading up on the function at the MSDN site and implementing it. Another, more simple but less secure, way is to use the windows Keybd_Event function to simulate keyboard clicks. If the notepad window has the focus, it will receive those clicks. Try searching this site or google for things like "Keybd_Event LabVIEW" or "simulate keyboard".
    Try to take over the world!

  • How to close the window openned by System Exec VI automatica​lly?

    Hello,
    I am using System Exec VI to lauch an exe file built from a LabVIEW program. When running System Exec VI, the window of exe file pop out and stays there even after all tasks are completed. I have to close it every time manually. Anyone here know how to close the exe file window automatically when it's done?
    Thanks,
    Jean
    Message Edited by Jean_CLD on 03-25-2010 11:25 AM
    Message Edited by Jean_CLD on 03-25-2010 11:29 AM
    Solved!
    Go to Solution.

    If I understand the question correctly you need to add an invoke node at the end of your application to exit. Depending on the whether it is running as a stand alone application or within LabVIEW it will either exit or stop execution. I've attached the VI I use in my applications.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Exit application.vi ‏13 KB

  • Opening a new browser using Runtime.getRuntime().exec(cmd); under windows

    Can Runtime.getRuntime().exec(cmd); open a URL in to a new browser in wondows OS or ...can we force it to any specific browser insted on OS's default browser...
    It does open a new bowser under MAC but not under windows..
    cmd = "'rundll32 url.dll,FileProtocolHandler"+URL (windows)
    Thanks

    public class WindowsProcess
         public static void main(String[] args)
              throws Exception
              String[] cmd = new String[3];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "start";
              Process process = Runtime.getRuntime().exec( cmd );
              process = Runtime.getRuntime().exec( cmd );
    }When you run the above code you should get two open dos windows.
    Now just just enter some html filename and hit enter in each window. IE should start up separately in each window.
    Thats also what should happen if you specify the html file as the fourth parameter. A new process should be created and two separate windows should open with a browser in each.

Maybe you are looking for

  • Thumbnail rendering

    Hi I like everything about Lightroom 2 except it's treatment of thumbnails. I have reams of similar photos so find that picking out the correct one from its thumbnails is slow and tedious. The wait whilst it twice re-renders every thumbnail seems int

  • Complex XML DataSet and Sorting

    Hello, Please consider the following XML data: <viewentries>     <viewentry>         <entrydata name="column1">             <text>text1</text>         </entrydata>         <entrydata name="column2">             <text/>         </entrydata>         <e

  • Background fill scale to fit scroll motion issue. Please help...

    I am having an issue with the background fill. I am using an image at least 2500px wide. It seems that when I have scrolling checked, the image scales to fit the browser normally when I preview the page. However, if I turn scrolling off, when preview

  • Error in navigation from service order to BP

    hi, I have created a button on IBASE screen(IBMAIN Component ---IBMAINViewset(create button)).on this event ,I called a outbound plug ,Through this outbound plug I called a navigation link in which source view is IBASEMAINViewset and Target View is B

  • Problem with phpmyadmin

    I use the local server xampp  and maridb I want a solution to this problem Welcome to phpMyAdmin Error MySQL said: Documentation #2002 - No such file or directory The server is not responding (or the local server's socket is not correctly configured)