LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get handle(s) to and poll non-LabVIEW window(s)/application(s) from LabVIEW?

Want to launch EXE from LabVIEW, wait for user to finish with EXE's UI, and once they closed it, return execution flow in LabVIEW. Cool, no problem.

Used the System Exec VI and with the "wait until completion" = TRUE the EXE never launches. Not sure why.

With the "wait until completion" = FALSE, the application runs with no problems, but now LabVIEW no longer waits.  Can't tell when user is done.

Work around idea... Once the Sys Exec VI launches the EXE, wait and poll some Windows API call to see when the window for the specific EXE closes. Cool.

I know G and no C.  What I would ideally like is a DLL, that I can wrap with the DLL Import Wizard.  Of course best would be a VI and the wrapped API call.

Any ideas?

Scott Rogers
Sr. DSM
Western NY
0 Kudos
Message 1 of 3
(2,601 Views)
Just download the lvwutil files.  This will allow you to montior windows, so you can monitor the EXEs window until it is closed.
0 Kudos
Message 2 of 3
(2,599 Views)
You could try it with a pipe. With a pipe you can open an exe, and interact
with it through a read and write reference. Although in your case the exe
might not start, since the normal sysexec doesn't start it...

http://forums.ni.com/ni/board/message?board.id=170&message.id=270461&requireLogin=False

Regards,

Wiebe.


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