Rui Qiu's Blog
  • Coming Soon
Subscribe
Rui Qiu's Blog
Rui Qiu's Blog
  • AutoIt

Force Reboot AutoIt Script

  • June 21, 2015
  • 1 minute read
  • me

Sometimes in our environment we need to force reboot some machines, here is the AutoIt script to do the job for us.

The reboot command will be first to run before user gets the notification about the reboot. So even if a user close the pop up window, the reboot still goes. and the user has two times notification. First is 30min before reboot, and second is 10min before the reboot.

 

#include <MsgBoxConstants.au3>
Run(“c:\windows\system32\Shutdown.exe -r -t 1800”)
sleep(3000)
MsgBox(262144, “System Maintenance Alert!”, “You have less than 30 minutes before the force reboot..Please save your work!!! Thank you and we appreciate your cooperation.”,1200)
Sleep(1200000)
MsgBox(262144, “System Maintenance Alert!”, “You have less than 10 minutes before the force reboot..Please save your work!!! Thank you and we appreciate your cooperation.a

me

Previous Article
  • Powershell

Powershell Script to Find Email Address from Username in a Text File

  • June 21, 2015
  • me
View Post
Next Article
  • SCCM

SCCM Maintenance Queries

  • June 21, 2015
  • me
View Post
You May Also Like
View Post
  • AutoIt
  • SCCM

SCCM Toad 12 Upgrade Package with AutoIt Script

  • June 21, 2015
  • me
View Post
  • AutoIt
  • SCCM

Deploy Apttus in SCCM with Autoit

  • June 21, 2015
  • me
Rui Qiu's Blog
SCCM, Powershell, Shell Script, Automation...

Input your search keywords and press Enter.