1

I want to write a vbscript that will wait for windows shutdown and intercept to carry out proper action before shutting down. I want this to be in vbscript since am using it for administration.

Smith
  • 5,765
  • 17
  • 102
  • 161
  • In addition, i just found a close example of waht am looking for. Here http://msdn.microsoft.com/en-us/library/aa393013(VS.85).aspx – Smith Aug 16 '10 at 03:10

1 Answers1

0

Much easier than that, ever since Windows 2000 you can use the Group Policy setting (or Local Policy even if you're not in a domain) to set the Shutdown Script which will be called, as the name implies, when someone is trying to shutdown the computer. For more info, check out MSKB #198642.

ewall
  • 27,179
  • 15
  • 70
  • 84
  • the truth is , i will be runing this scrip[t most of the time in limited user account, it can be cumbersome to do this manually over 50 systems am managing. the script is just to ensure a proper shutdown of other applications am using to monitor network before windows shutsdown – Smith Aug 17 '10 at 12:50
  • 2
    In my experience, Windows still continues to shut down, so the script may not be able to finish running. – Synetech Aug 09 '14 at 17:28