Could someone give me the code
to reset the computer.
It needs to be a way that the
computer wont ask to save anything
before it resets or shuts down.
Printable View
Could someone give me the code
to reset the computer.
It needs to be a way that the
computer wont ask to save anything
before it resets or shuts down.
Try the ExitWindowsEx API. :rolleyes:
Code:Option Explicit
Private Const EWX_SHUTDOWN = 1
Private Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Sub KillTheComputerAndDontLetTheUserSaveAnyWork()
Call ExitWindowsEx(EWX_SHUTDOWN Or EWX_FORCE, 0)
End Sub