These shortcuts are created by entering the appropriate command into the shortcut dialog box. "Shortcut" option can be found in "New" entry in the right-click context menu anywhere in windows explorer.
Look at the below screenshot:
![Create Shortcuts For System Commands [Shut Down, Log Off, Restart etc]](http://www.techvigil.com/images/post_images/tt31_a.png)
Here is a list of commands that can be used as reference:
Function | Command |
---|---|
Logoff | C:\Windows\ system32\shutdown.exe -l |
Shutdown (with 30 second default delay) | C:\Windows\system32\shutdown.exe -s |
Shutdown (with delay of zero second) | C:\Windows\system32\shutdown.exe -s -t 0 |
Shutdown (with delay of nn seconds) | C:\Windows\system32\shutdown.exe -s -t nn |
Restart (with 30 second default delay) | C:\Windows\system32\shutdown.exe -r |
Restart (with delay of zero second) | C:\Windows\system32\shutdown.exe -r -t 0 |
Restart (with delay of nn seconds) | C:\Windows\system32\shutdown.exe -r -t nn |
In Windows, there is a specifica file for shutdown or related commands. This file is Shutdown.exe and it is typically located in C:\Windows\System32\. If your Windows directory is other than the C: drive, replace drive letter accordingly.
If you are familiar with environment variables, note that all possible locations of the Windows directory can be covered by writing the base command as %WINDIR%\system32\shutdown.exe Shutdown process can be forced without giving the usual warning by adding "-f" to shutdown commands. For example:
%WINDIR%\system32\shutdown.exe -s -f
Note that data may be lost in a forced shutdown.
Post tagged in:
Windows