简体   繁体   中英

Start EXE on startup or unlocking of Windows

I have configured my application under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit

This works perfect when I log-off and log-in, but does not lock the machine and log-in, how can I make my EXE to start during lock/switch user?

If the application is always running during a session switch you could listen to the SessionSwitchEvent... (I am assuming you already started the application at the first session start so it's still running while locked)

Here is some MSDN informations: https://msdn.microsoft.com/en-us/library/microsoft.win32.sessionswitcheventhandler.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM