02-20-2017 02:18 AM
Cany anyone tell me how to launch an executable in command prompt using lab windows CVI?
02-20-2017 02:36 AM
Have you tried searching the forum for an answer?
This question appeared several times before, refer to this thread for a solution.
02-23-2017 09:52 PM
Can anyone tell me how to use LaunchExecutable()?? Somewhere it's given that include filename as parameter and somewhere to use cmd.exe /c command args.
and in example its mention to use it like this:
LaunchExecutable ("cmd.exe /c copy c:\\temp\\file.tmp c:\\tmp");
What shall I do in this case, kindly reply.
02-24-2017 03:00 AM - edited 02-24-2017 03:05 AM
As you can see in the help for the function:
If you need to execute a command built into cmd.exe, such as copy or dir, you can call LaunchExecutable with the following command:
cmd.exe /c command args
That is: is the program to execute a standalone executable? Then pass it directly to LaunchExecutable. Is it built into an interpreter? Then call the interpreter passing the command to execute as a parameter.
As per passing parameters or filenames or so to the command, it depends on the command itself and what you need to do with it. As an example, "dir" will output the folder content, but it is useless if launched this way if the output is not redirected somewhere (e.g. to a file) for further examination (it will briefly open an output window and close it immediately so you cannot see the result).
03-01-2017 06:34 AM
I launched an executable successfully through command line. Now at the same time without exiting that executable i want to give power...so how will I do that?
03-01-2017 08:44 AM - edited 03-01-2017 08:45 AM
I don't know what exactly "give power" means, but LaunchExecutable is not stuck waiting for the external program to terminate: once launched the other application, your program continues running so you should be able to "give power", whatever this may imply.