If you are finding a one-click way to shutdown or restart you computer in Windows 7,here it is,please follow below instruction.
1.Right-click a empty place of you desktop,select New—Shortcut
2.Enter one of the following command line (We select shutdown as example here,see screenshot)
Shutdown.exe -s -t 00
Shutdown.exe -r -t 00
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
3.Then click Next and input a name for this shortcut,Eg:Shutdown Computer ,then click Finish
4.On your desktop,right click shortcut “Shutdown Computer” and select Properties
5.Go to tab Shortcut and click Change Icon (You can set a shortcut key in this step)
6.Type in shell32.dll in and press enter to select proper icon for this shotcut,then click OK twice.
7.Go to desktop again,right-click shortcut Shutdown Computer and click Pin to Taskbar
8.Done.Now you have pin shutdown computer icon to taskbar,and you can delete the useless shortcut from desktop
Tips:You can use the same way to pin lock screen shortcut to taskbar in windows 7