10-11-2013 06:40 AM - edited 10-11-2013 06:43 AM
I have an application I am calling using system exec.vi. Later in the opened application I need to pass the parameter using system exec only? How to do this?
This is related with my other thread here but question is little modified and different?
Here is what I tried.
10-16-2013 06:08 PM
System Exec does not work that way. If an exe supports passing parameters at execution time, you can pass them just as if you were calling them from a command line. The transaction is atomic, and there is no reference that you can grab onto to continue interacting with the exe, once it has performed what is was commanded to do in the system call.
Do do what you are suggesting, you would need to have support within the exe itself to access and control a running instance.
Here is an example:
C:\my_service.exe /start (starts my_service, and returns to the command prompt)
C:\my_service.exe /status
Running...
C:\my_service /pause
C:\my_service.exe /status
Paused...
C:\my_service /stop
C:\my_service.exe /status
Not Running.
In this example, my_service spawns a process that continues running in the background. my_service.exe is simply an interface to the actual process.