One of the features Vista’s UAC lacks is a way to temporary disable it without reboot. Under Linux you can just run the su command if you to have to accomplish several tasks that need root privileges. Vista and Windows Server 2008 don’t have such a feature. The only way to get rid of the UAC prompts temporarily is to logon with a domain administrator account. But sometimes this is very inconvenient. This is where a nice workaround, which I found in the Windows IT pro magazine (April 2008, p. 10) can be quite useful.
- Root login via SSH and SFTP on EC2 instances running Linux - Wed, Jan 12 2022
- Poll: Will you deploy Windows 11 in 2022? - Mon, Jan 10 2022
- Authors and members of the year 2021 - Mon, Jan 3 2022
The trick is to elevate the desktop shell (explorer.exe), temporarily. Any tool that is launched from an elevated application will run with administrator rights. And best of all, UAC will not display its disturbing prompts from then on. The downside of this solution is that you have to kill the explorer process, first. You can just imagine the problems, it might cause. So I would recommend using this workaround with caution.
Here is how it goes. Create a batch file with the extension cmd with these two lines
Taskkill /F /IM explorer.exe
/F means that the task is killed forcefully, and /IM stands for the image name, i.e. the file name of the process. Be careful with the second line. I had a typo in it which left me with an empty desktop. In such a case you can launch explorer.exe with the Task Manager (CTRL+ALT-DEL -> File -> New Task (Run…)).
You have to run this batch file with admin privileges (right click on it and navigate to “Run as administrator”). The UAC prompt will just be displayed once. After that you won’t see it again in this session. Note that not only those applications where its icon contains a UAC shield will be launched automatically with admin privileges, but also those programs which should never be elevated (Internet Explorer for example).
Well, this is like in the good old XP times. You will again be the absolute master of your machine. What I find interesting is how easy it is to trick UAC. If malware manages it somehow to entice you to click just once on a UAC prompt, it will be the master of your computer from then on.
Unfortunately there is no easy way to switch back to standard user rights like under Linux. After you finished your administrative tasks you have to logoff and logon again. Please, let me know if you know of any other way.
Subscribe to 4sysops newsletter!
Another option to turn off UAC is the TweaUAC. I could have sworn that before SP1, rebooting Vista wasn’t required. But when I tried it today, this didn’t work anymore.