LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Start a .exe File in my CVI Programm

Hello,
I have a CVI Programm. This Programm ask me for a other Programm name. I must write this in an input window.
My Programm search on c:...! If it found this CVI Release exe file, I want close the active CVI-Programm and start the other CVI .exe.
I want do this with system(), but it does not go. I got a "NON FATAL RUM TIME ERROR" -> Library Function Error(Return Value -3)
Can somebody help me?
Thanks!!!

Message Edited by C.Tommy on 03-24-2005 12:27 AM

0 Kudos
Message 1 of 3
(3,412 Views)
Error code -3 means File not found: seems there is something wrong in your command (you can see a list of error codes returned by system function right clicking on Status fiels in System function panel).

But besides it, System () waits for the launched executable to finish before returning control to your program, so in my opinion that's not the correct solution to your problem. I suggest you take a look to LaunchExecutable () function that does not wait for the launched program to finish before returnin control to you, so you can exit the first program while the second is running.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,408 Views)
As Roberto mentioned, LaunchExecutable() is one way to do what you want. You might want to look at LaunchExecutableEx(), it can give you a little more control over how things work.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 3 of 3
(3,385 Views)