How to send a exit program signal to a program prior to Windows shutdown

678hug

New Member
Good morning all,

I use a folder lock program which allows me to hide / unhide personal folders. I start the software, enter my code and the folders are then displayed. The software sits as a small icon down by the clock while the PC is on.

In order to relock the folder, i then have to simply exit the program (right click and exit) or manually lock from within the software.

Unfortunately, if i forget to relock prior to Windows shutdown, the software starts in the state i left it meaning Windows starts with the folders unlocked.

Is there any way of exiting the program automatically when i shut down Windows.

It needs to be exited (which then relocks the folders about a second later) prior to Windows shutdown. It is not simply closing the program like others as part of the shutdown process as this does not give sufficient time to relock the folders.

Thanks

Paul
 

Neemobeer

Cloud Security Engineer
Staff member
You might be able to accomplish this with a powershell script

Stop-Process -Name <nameofprocess>

Then create a scheduled task that runs the powershell script

Trigger will be "on event"
Log: System
Source: User32
Event ID: 1074 (system shutdown)
 
Top