VB Code:
  1. Private Const EWX_REBOOT As Long = 2
  2. Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
  3.  
  4. ' REBOOT THE COMPUTER
  5.  
  6. lngResult = ExitWindowsEx(EWX_REBOOT, 0&)