How can i initiate a shutdown (CTRL+ALT+DEL) without using JNI on my Windows box?
Created May 14, 2012
Davanum Srinivas You can call Runtime.exec() and execute rundll32.exe with a few parameters.
rundll32.exe shell32.dll,SHExitWindowsEx (to close the session) rundll32.exe shell32.dll,SHExitWindowsEx 2 (to reboot) rundll32.exe shell32.dll,SHExitWindowsEx 3 (to power down)