LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Running DOS command in CVI

Hi,
 
I am trying to open a file through CVI. I know that LaunchExecutable function can launch an excutable file. However, what I am trying to do is to open a file through my executable, which is an application. Please see the attached screen shot of the command prompt to get a better idea.
 
Thanks.
0 Kudos
Message 1 of 4
(3,689 Views)
What's your exact problem ?
LoadExecutable should work fine. However you might have to give the full path to your application and data. Something like
LoadExecutable("C:\path\to\broadcaster32.exe /b C:\path\to\bkgd_direct_imp_pid_186_187_que");
should work.
Note that there is also the ANSI C function system(). That function waits until the end of the started command instead of continuing the launching program.
 

Message Edited by markus kossmann on 08-07-2006 01:03 AM

Message Edited by markus kossmann on 08-07-2006 01:07 AM

0 Kudos
Message 2 of 4
(3,672 Views)

Thank you Markus. This solved my problem .. I was initially trying: LaunchExecutable ("c:\\path\\broadcaster32.exe /b bkgd_direct_imd_pid_186_187.que")... But trying the way you suggested wroked for me.

 

0 Kudos
Message 3 of 4
(3,643 Views)

For future reference, if you use OpenDocumentInDefaultViewer() in CVI you do not need to know the path or even the name of the application to open a file for the user.

http://forums.ni.com/ni/board/message?board.id=180&message.id=18104&requireLogin=False

0 Kudos
Message 4 of 4
(3,605 Views)