Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want my PC to ask me for a password when it tries to reboot or restart. My friend thought it was funny to use remote control on teamviewer to restart my PC, and knowing him, hes definitely going to try that again next time I get on teamviewer with him. I'd like to prevent him from doing so. How?

share|improve this question
These are the details of the processes that take place when any software needs to request the OS to shutdown;… ; Not exactly a solution to your problem but I'm hoping this will give some idea about how to proceed next – user13267 May 2 '13 at 4:42
up vote 2 down vote accepted

I don't think this is possible as TeamViewer often run under Administrative privileges. And I have used TeamViewer for quite a while, and the TeamViewer bar has its own Shutdown button, which I believe basically send some commands directly to the OS.

The only thing you might be able to do is to set up TeamViewer to "confirm" everything the person connecting do.

To do this you go under Options - Advanced - Advanced Settings for Connections to this computer.

Access Control -> Custom Settings

Under "Control this Computer" might want to change it "After Confirmation" - 

He can't control unless you give confirmation. He can only connect and view your screen.


Lock the local keyboard and mouse "Denied" - so he can't lock you out


Control the local TeamViewer "Denied" - so he can't change that setting.

Hopefully that helps. (I haven't personally tested it, but those are the relevant options that I can think of)


share|improve this answer
Unfortunately you're probably right about it being impossible. :\ Thanks for your reply. – user1534664 May 2 '13 at 13:01

You could disable the shutdown/restart options entirely through local GPO:
Then the options aren't even available. If you really need to shutdown, just issue the "shutdown" command from the command prompt.(though you friend may figure this out as well)

If it's a true window prompt your after, I'd suggest looking at a vbscript that fires when you logoff. Though I'm not entirely sure if you can cancel a shutdown/restart from a script.

share|improve this answer
Theres an option in teamviewer that is under the action tab called "shutdown", so he is not even using the windows taskbar menu unfortunately. – user1534664 May 1 '13 at 22:38
ah, I am unfamiliar with the software so I didn't know this. – Lee Harrison May 2 '13 at 13:25


  • Click on Start → Run… → gpedit.msc (or, alternatively: WinR → gpedit.msc)

  • Computer Configuration → Administrative Templates → System

  • Display Shutdown Event Tracker → Enable

This is not available in all editions, though, so you could also try:

  • Click on Start → Run… → regedit (or, alternatively: WinR → regedit)

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Reliability

  • New → DWORD 32

  • Enter as name: ShutdownReasonUI

  • Enter as value: 1

share|improve this answer
I wasn't sure what the shutdown event tracker was, so I tested it and its that window you get when your PC gets back on after you shut it down, asking you why it was shut down. I need something that prevents the computer from terminating. Thanks. – user1534664 May 1 '13 at 23:05

The easiest way would be just unistall team viewer or if you actually use it on a regular basis remove him as user or change your password

share|improve this answer
Thats not an option, I teamview alot with him, I just want to prevent him from being a cheeky bastard by turning my PC off. He just thinks its funny. – user1534664 May 1 '13 at 23:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .