Results 1 to 6 of 6

Thread: Shutdown Windows XP

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    3

    Question Shutdown Windows XP

    Does anybody know how to issue a shutdown command via code in Windows XP? The old way (like in the VB-World demo) does not work.

    Thanks in advance.

  2. #2
    Member trn_psycho's Avatar
    Join Date
    Feb 2001
    Location
    USA, Texas
    Posts
    46
    I'm not sure what the demo uses, but XP is an NT based system so you will have to adjust tokens in order to shutdown. It's not very difficult. You can see the whole code here:

    http://vbaccelerator.com/tips/vba0019.htm

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    25
    There is an excelent article about this at msdn.microsoft.com its exactly the same as windows 98 but with an extra parameter

    I found it for you:

    msdn.microsoft.com/library/en-us/sysinfo/shutdown_3ago.asp?frame=true

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Posts
    25
    I am pretty shure that the link psycho posted is far two much code i accomplished it in less than 30 lines of code

  5. #5
    Member trn_psycho's Avatar
    Join Date
    Feb 2001
    Location
    USA, Texas
    Posts
    46
    Fozzy, have you tested the code you posted on an XP machine without admin rights?

  6. #6
    Junior Member
    Join Date
    Jan 2002
    Posts
    25
    Errrm... errrrr how can i say this...

    ...No

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