Here is a workaround:
- Right click on the
Shutdown
button and choose Properties
- define the default action as
logoff
You still don't get a dialog asking "do you really want ...". But you are only logged off when the Button is clicked by accident.
EDIT: if you are wondering what happened to the shutdown
entry: it has been moved into the arrow menu
now (automatically).
This was my original answer:
Log in as the restricted user, then go to c:\windows and right click
on regedit and click "Run as Administrator" (you will be asked for the
credentials), and make the same registry changes.
OK, to be honest, after I wrote the answer, I decided to test it, and double-check my answer as I often do. What I found blew up a long-held thought that I had, and I am going to mention it now because I am sure that I am not the only one, who will be surprised.
Despite being logged in as my user "Test", when I ran regedit.exe as administrator (or even a second administrative user), instead of it ONLY running the program with elevated privileges, it also changes the HKEY_Current_User hive to that same administrator account. I was extremely surprised.
So I would do it this way for simplicity: Elevate the user to administrative level temporarily in Control Panel>Users. Log in as that user, and make the registry change exactly as you had above. You can test it immediately by right-clicking the taskbar. Log out, and back in as administrator, and demote the user back to standard. I tested this and it worked.
An even easier way: While logged in as your administrative user, elevate the standard user to administrative level temporarily in Control Panel>Users, then follow the original answer. Now running regedit as that user, it will load their hive, and you can edit it. Then demote them again. This way, it is all done without logging in and out.
I think this is clear, but if I did make something a bit confusing, just ask in the comments, and I will try to clarify.
Best Answer
The easiest way to do this is with a local group policy.
To do this, go to your local group policy editor (Click Start, type gpedit.msc in the Start Search box, and then press ENTER.)
Once this is loaded, go to the following path: Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) > Shutdown (See Below)
Within here, you can choose to select scripts which will run on your machine as part of startup/shutdown. You can also follow the User Config > Windows Settings > Scripts (Logon/Logoff) to setup scripts which run at logon and logoff.
The differences are:
Startup Runs before a user logs on. Startup scripts execute as the local system account
Logon Runs as soon as a user has entered their password. This executes as the user who is logging on.
Logoff Runs as the users session is logging off (whether shutting down or logging off to change user) and executes as the user logging off
Shutdown Runs after logoff and only as part of the machine shutting down. This runs as the local system account.
Hope this helps.