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: 

Is there a way to detect when Windows is being shutdown?

I am writing a LabView program that will run in the background, hidden from the user. I was wondering if there is a way to detect when Windows is being shutdown or restarted?

Thank you for your help!
0 Kudos
Message 1 of 3
(2,174 Views)
If you put your VI in the Windows STARTUP group, and then in the VI execution properties, set it to RUN MINIMIZED, you should achieve the desired result. As far as LOGGING when windows is opened or closed, that is a different matter. You might be able to extract that information from one of the BIOS tools.

Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 2 of 3
(2,174 Views)
Thanks for your reply - we currently have the program in the startup and it is set to run hidden - my goal now is to find a way to gracefully exit the program automatically (close the output file) when the user shutsdown at the end of the day - I will explore the BIOS tools - thanks!

Jenn.
0 Kudos
Message 3 of 3
(2,174 Views)