Introduction - If you have any usage issues, please Google them yourself
This is a example of how to Shutdown, Restart, and Log Off Windows XP using code. This uses Shell code. It works very well. I only tested the Shutdown code but the others should work. Note: The shutdown service will obviously need to be running for this to work. It is by default so you shouldn t see to many cases of this code not working.