|
-
Jan 6th, 2002, 01:36 PM
#1
Thread Starter
New Member
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.
-
Jan 6th, 2002, 08:51 PM
#2
Member
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
-
Jan 7th, 2002, 08:11 AM
#3
Junior Member
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
-
Jan 8th, 2002, 06:23 AM
#4
Junior Member
I am pretty shure that the link psycho posted is far two much code i accomplished it in less than 30 lines of code
-
Jan 8th, 2002, 07:55 AM
#5
Member
Fozzy, have you tested the code you posted on an XP machine without admin rights?
-
Jan 8th, 2002, 09:09 AM
#6
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|