LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

start/stop a windows application

For within a labview VI, I kick off (run) an exe (let's call it Scanner.exe) using the System Exec VI,  What I do not know, however, is how to shut it down remotely.  Is there a call for this?  Better yet, is there a way to query the currely running tasks (in WIndows 7) to (a) ensure that the system exec was successful and is indeed running, and (b) the use the application's name to shut it down somehow?  I am using LabView 2009

0 Kudos
Message 1 of 5
(3,142 Views)
I think this will help by using win32 API: http://digital.ni.com/public.nsf/allkb/81E9C1441900FFCE8625748F0055DBB0
Thanks
uday
Message 2 of 5
(3,125 Views)

Hello!

 

Here you have shortened list of available messages:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff468922(v=vs.85).aspx

 

And here you have example of listing running tasks:

https://decibel.ni.com/content/docs/DOC-9276

 

Marcin

              

Think Dataflow - blog.mtapp.tech
Message 3 of 5
(3,110 Views)

Hi Bean,

U may kill any task using this command to system exec :  taskkill /f /im "EXE Name.exe".

 

EXE Name refers to Name in Task Manager

AB
Kudos are Accepted
0 Kudos
Message 4 of 5
(3,070 Views)

You can also use the .NET process library - it's like SystemExec but offers a lot more functionality including being able to stop/kill/monitor a process.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 5 of 5
(3,053 Views)