Just make a kix file from the 7 lines of code in the first post. The little bit of WMI is necessary to see if a user is logged on. Does anybody out there know how to set the SE_Shutdown privilege?