From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System exec-Need to pass the arguments to an already opened application called from system exec

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.

 

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 1 of 2
(2,336 Views)

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.

 

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 2
(2,279 Views)