LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run exe with options

I'm trying to run an exe file with options. I found this link: http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA

 

The issue is that I have to run the code thousands of times with different options and it is not realistic to create thousands of different .bat files. Is there another way to do this where I can change the executable options on the fly?

0 Kudos
Message 1 of 3
(2,594 Views)

Instead of passing the string

 

somefile.exe -option1 -option2

 

try

 

cmd /c "somefile.exe -option1 -option2"

 

 

0 Kudos
Message 2 of 3
(2,587 Views)

There's no need for a batch file, you can call it directly from LV with System Exec and the correct command line. That way you can generate the command line through e.g. Format into string.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,518 Views)