When a user of mine clicks the 'Restart' button on their system (Windows 10 in an Active Directory environment) I would like a quick batch script to run BEFORE the restart takes place.
My thought is that if I could remap the restart button to run the batch script and then have the last line in that batch script run the restart command.
How can I make this happen... unfortunately almost all searches including the word "remap" are talking about remapping keyboard keys.
EDIT: I am aware that we can run a shutdown script... unfortunately, I only want to run this script on RESTART, not on shutdown. If there was a way to differentiate, that would effectively solve the problem as well.