Well to do it in Windows XP/NT/2000 is simple. but you've gotta use API and set UserTokens. Take a look at msdn.microsoft.com it's got an example somewhere. Search for ExitWindowsEx API call and see what comes up.
Or Go here: http://msdn.microsoft.com/library/de...tdown_7z8u.asp
Good luck.