The following brief VB program has worked effectively to reboot Windows 98 (using the Windows scheduler) - but it doesn't work on Windows XP (Home) - Can anyone help?
-----------------------------------------------------------
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_LOGOFF = 0
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
ExitWindowsEx EWX_REBOOT, 0
Unload Me
End
End Sub
-----------------------------------------------------------
-----------------------------------------------------------
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_LOGOFF = 0
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
ExitWindowsEx EWX_REBOOT, 0
Unload Me
End
End Sub
-----------------------------------------------------------