Windows Operating System come with different ways to turn it off , restart and logoff . Whether you shutdown, restart or log off, the file that is responsible for this is shutdown.exe in the system32 directory of your Windows. We will now learn how to play with shutdown.exe giving it different parameters.
To do this, we’ll be keying in shutdown.exe in the RUN command window (available from Start) along with its parameter(s).
Casual Shutdown : When you run shutdown.exe with the parameter -s, your system will turn off normally. For this, you’ll run it as shutdown -s
Force Shutdown : To forcefully shut down your PC, you’ll run shutdown.exe with the parameter -s -f , i.e. shutdown -s -f . This will forcefully terminate all of your running processes shuts your PC forcefully. This saves your shutting down time, when you are in a hurry and you want to turn off your PC safely.
Timed Force Shutdown: If you want to forcefully shutdown your PC after a desired time ,say 60 seconds, here we use parameter -t for the purpose. When you run shutdown.exe with the parameters
-s -f -t xx (where xx is the time in seconds), your PC will forcefully shutdown after the specified time. For instance, to turn off after 60 seconds, you will enter the parameters as -f -t 60.
i.e. shutdown -s -f -t xx
Restart : If you are familiar with shutdown, its not complicated to go on with restarting commands. To restart, you will just have to replace -s with -r. Confused? For Casual Restart, the command is shutdown -r, and for Force Restart, it is shutdown -r -f, and for Timed Force Restart, it is shutdown -r -f -t xx. Simple eh?
Log Off: When you run shutdown.exe without any parameter, it stands for log off, meaning, your PC will log off. You can also use -l as a parameter to log off. Shutdown or shutdown -l
List of commands for your revision:
shutdown.exe is to shutdown the associated process.
Logs off when used without a parameter
-l Log off
-t xx timed. xx-in seconds