You can call Process.Start to execute the command PENNYSTOCK suggests, but it must be done with two parameters:The shutdown.exe commandline program can do much more than that too. You can get help on its parameters either in the Windows help or on the commandline itself. The other option is to use the ExitWindowsEx API. There are plenty of examples on the forum already. Keep in mind that while both these options will work on WinXP they are not available on all Windows versions. I believe that there's another API too but I can't remember the name. Something like "InitiateWindowsShutdown" but not quite.VB Code:
Process.Start("shutdown", "-s -t 00")




Reply With Quote