So to use this Trick just follow these simple steps:
- Click Start >> type "mmc" >> press Enter to Open the Microsoft Management Console.
- Now in the file tab, click on add/remove snap-in.
- Now in the left side, under the available snap-in’s, select Group Policy Object and double click on it and click browse.
- Now under the Users tab select Non Administrators and click OK.
- Now under the newly created Local computer/non administrators policy object in the left pane navigate to User Configuration >> Administrative Templates >> Start Menu and Taskbar.
- Now here select “Remove and Prevent access to the Shutdown, Restart, Sleep, and Hibernate commands” and double click on it from the right pane.
- Now select Enable >> Apply >> OK and it is done. Now windows 7 is prevented from shutting down or restarting.