ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Watchdog Timer

How to trigger Labview to run code based on windows user logon or logoff?

0 Kudos
Message 1 of 2
(3,268 Views)

I'm not 100% sure that I understand what you're asking but I think that step 1 is to configure the LabVIEW EXE to run as a service, so it runs on the PC startup, before any user logs in.

 

Step 2 would be to use .NET to register for the event "Microsoft.Win32.SystemEvents.SessionSwitch" found in the "System" .NET selection.

 

Steps 3 (and on...) are then to do something when the callback VI assigned to that registered event fires.

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