I have a Windows service that has always been running since starting up the PC, as I would have discovered using .NET 3.5 or WMI when a user or other application / process requested a shutdown or restart on Windows.
I donβt want to stop it, just write down the time and who initiated the shutdown (the user or process is OK, you donβt need to know which process)
thanks
source share