13/09/2008
› Tutorial › Tags: Scripting, Tutorial, WindowsShutdown, Reboot, Hibernate, Log Off, and Lock Computer in Windows XP from Command Prompt
Maybe this command is useful for whom made some program that shuts down, reboot, hibernate, log off, and/or locking the computer in Windows XP by executing it from Windows XP command prompt or ‘console’.
Shutdown:
%windir%\System32\shutdown -s
Reboot:
%windir%\System32\shutdown -r
Log Off:
%windir%\System32\shutdown -l (lowercase L)
Hibernate (only if hibernate feature is enabled in Power Management)
%windir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate
Lock Computer (go to Login Screen without logging off current user)
%windir%\System32\rundll32.exe user32.dll,LockWorkStation
shutdown command’s parameter can be combined with other parameters such as -f (force running application to close withour warning), or -t (time in seconds before shutdown occured). Complete shutdown command parameter can be viewed by typing shutdown whithout any parameters or with shutdown -? from Windows XP command prompt.




