Hey programmers....

I've seen this floating around on the net before, but the one time I am looking for it, I cannot find it! I am looking for a piece of code that shuts down, or restarts (depending on a passed parameter) Windows. I have seen the code that displays the Windows Shutdown Dialog and waits for a user to choose - I do NOT want this! I want my program to have control over what happens in regards to a shutdown/restart.

I'm stilll gonna google search, but if anyone can post the code here, it would help me out a lot!

Thanks in advance!