Results 1 to 2 of 2

Thread: Reseting the computer

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    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.


  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Try the ExitWindowsEx API.
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width