Windows 8 system starts to add shutdown button tutorial

  
For those who do not want to use third-party software to modify the shutdown /restart /logout button for Windows 8 to modify the following is a good good way, we can DIY a own shutdown button . The procedure is quite simple!
First, we create a shortcut on the desktop

then enter the corresponding command next


such a shortcut has been created, egg thing We found that this icon is not very satisfactory, so we changed the corresponding icon.
The corresponding icon can be found and modified in the system, or you can download it yourself on the network. I have found a few more beautiful ones.

Click to browse and select the icon file path

The shortcut will become like this.

After we have made all the shortcuts. Copy him to the start menu, (this requires administrator privileges) How to get this?
Start menu path: C:ProgramDataMicrosoftWindowsStart MenuPrograms, of course, if your system disk is not C drive, then put the front C will change it.
Find the way to start the menu path, right-click on the shortcut to select a desktop program at the start of the program, and select Open File Location.

Then find our shortcut on the far right of the start interface, regroup the shortcuts (left click on the stickers, drag a certain distance to the right, until a white line appears)

The last is like this

Finally, we click on the minus sign in the lower right corner (press CTRL+mouse wheel), reduce the entire interface, and move the tile group to the end of a group, and at the same time I put the desktop on it. Then it became like this.

Then everything is done.
I will share some information below.
About shortcut location
Shutdown: Shutdown.exe -s -t 00 -hybrid
restart: shutdown -r -t00
lock: rundll32.exe user32.dll,LockWorkStation
logout: shutdown.exe -l
Attentive friends I found that there are sleep and sleep options in my start menu. Why didn't the interface start?
This is a problem that has been bothering me for a long time, and it has not been solved very well.
First talk about it. These two commands
sleep command: rundll32.exe powrprof.dll, SetSuspendState 0, 1, 0
Sleep command: shutdown -h
seems to be no conflict, but if you want to call the sleep command normally, you first need a statement to disable the sleep function (this statement must also be run as an administrator) Otherwise, it will go to sleep instead of sleep, but if you disable hibernation, then the hibernate shortcut will have no effect, so I wrote two batches
hibernate
powercfg -hibernate On
shutdown -h
sleep
powercfg -hibernate off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
When I change the path of the shortcut to these two When I found the file, I found that the start program could not be displayed. I concluded that the target file should be a non-exe executable program.

Copyright © Windows knowledge All Rights Reserved