How do I use ExitWindowsEx? I've tried it with the shutdown flag, but it just takes my computer to the Shutting Down Windows 98 screen kind of thing and then stays there. When I restart it has to run scandisk because it didn't shutdown right. When I tell ExitWindowsEx to restart, it works fine, but not when i tell it to logoff. What it does when i tell it to logoff is it logs out of my name, logs in as the default login, and then shows the login dialog. What's with that? Someone help me, i'm writing a shutdown scheduler. Thanks.