0

My office computer automatically restarts (group policy). I would like to have an app that simply detects that an automatic restart is going to happen, and perform an action (send an email to me). A possible path I found was ARR

(which I found by this question: Detect whether a Windows reboot was due to Windows updates)

However, this is in C, C++, and I'm really just a noob with rudimentary VB.net knowledge. A possible path would be to use GetProcessByName if the automatic update restart is performed by a specific process. Thus my questions are:

  • Is there a specific process that's started for a Windows Automatic Restart?
  • Is there a better way to do this?
Community
  • 1
  • 1
Esteban
  • 179
  • 8

1 Answers1

1

ARR is probably the most correct way to do this.

To try and stick more to your wheelhouse, you could write a VB app that runs on startup and searches the event logs similar to this

Community
  • 1
  • 1
Eric Walker
  • 1,042
  • 10
  • 15
  • Thanks for the suggestion! So the problem with doing anything after the restart, is that it requires me to log-in, which is not automatic (I want the email sent so that I know I have to go to the computer, and log-in and restart all the time-sensitive stuff I had churning away... darn forced restarts!) – Esteban Jul 16 '15 at 01:56
  • 1
    Actually depending on what version of windows, or your comfort level with writing services, it wouldn't necessarily require a logon. Windows 7 scheduled tasks can be triggered at startup, or a service could both get you what you need. – Eric Walker Jul 16 '15 at 13:19
  • Didn't know that, thanks! I'll have to check into those options. – Esteban Jul 16 '15 at 17:15