Results 1 to 3 of 3

Thread: VB Snippet - Reboot Windows

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    VB Snippet - Reboot Windows

    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&)
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  2. #2
    Lively Member
    Join Date
    Feb 2003
    Posts
    79
    hey, I love all of the snippets you post here, there great. But with this, and shutdown windows, they dont work with XP. Is this something known, and is there other code I can use for these commands, or am I just mistyping something maybe?

  3. #3
    Junior Member
    Join Date
    Mar 2003
    Posts
    28
    They do not work because XP is NT based. You must adjust token privileges for the process. Go here to see the snippet.

    http://www.jaredshelp.com/article65.html

    Thanks
    Jared

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