Some weeks ago, I blogged about a little script that allows you to turn off Vista's UAC temporarily by killing the Windows Explorer process and restarting it with administrator rights. In a comment, Marty remarked that one doesn’t have to kill the Explorer process if one configures Windows Explorer to start in a separate process. Now, I just stumbled across a blog post that explains how to elevate Windows Explorer, which is essentially the same topic. I suppose many of you didn’t follow the discussion in my original post, so I thought I would repeat it here with some new insights.
- OpenVPN IPv6 and IPv4 configuration - Mon, Mar 1 2021
- 4sysops author and member competition 2020 - Fri, Jan 1 2021
- Assign an IPv6 address to an EC2 instance (dual stack) - Tue, Dec 15 2020
This is not only about disabling UAC, though. It is also helpful if you want to edit a file in the Windows or Programs directory. You probably know that you can’t just do that by opening the file through Explorer. If you try it this way, your editor won’t be able to save the file. It doesn’t help if you elevate Explorer before you open the file, either. The reason for this is that Explorer is already running, since the Windows desktop is also an Explorer process.
As noted above, one way to solve this problem is to kill the first Explorer process and then relaunch it with admin privileges. However, a better way is this:
- Enable “Launch folder windows in a separate process” in the folder options of Windows Explorer: Press ALT, Tools -> Folder Options -> View. You only have to do this once
- Close all Explorer windows. Note that there are also Windows apps that are based on Windows Explorer, for example the Control Panel. You have to close these, too
- Launch Windows Explorer as administrator: Right click on the Windows Explorer icon and navigate to “Run as administrator”
Now you will be able to launch elevated apps from Windows Explorer. For example, you will be able to edit files in the Programs folder by opening them from Windows Explorer. Also, if you are starting an application from the Start Menu or desktop that has to be elevated, you won’t see a UAC prompt.
After you finished with your administrative tasks, you have to close ALL Explorer windows again. It is not enough if you just close the first Windows Explorer you launched explicitly as administrator. Once you’ve done this, UAC will be back to normal, and it will get on your nerves as usual.
Subscribe to 4sysops newsletter!
Gosh, I am starting to like UAC. It is fun to fool around with it.