What is the recommended User Account Control (UAC) setting when developing on Windows?

Even on Win7 I find it annoying enough to turn it off (because it makes me more productive with it off) but sometimes I feel bad because I know I'll find more problems in my code if I leave it on.

  • "It works on my machine!" The classic response from a developer being told about a problem with his software. This could be due to differences in access rights, hardware resources or installed libraries (and then some). Just try to be aware of possible limitations of a user's machine compared to yours and test if you can before release. Because... "We're not shipping your machine!" Nov 14, 2019 at 21:44

4 Answers 4


The recommendation (even from Microsoft) is to leave it ON, and also to run your IDE unelevated whenever possible.

First of all, it forces the programmer to live with the same "annoyances" a real world user will have (if you don't know it, would you program correctly around it?).

Then, disabling UAC and working as an administrator is as bad as in Unix to work as root (decades of common wisdom will tell you why that's bad).

  • 4
    Windows is not linux, that's not really a good comparison .. Sep 3, 2010 at 16:02
  • 9
    @Kop: running with full privileges is either good or bad regardless of the OS... I can't see how Windows and UNIX/Linux are different in that.
    – Wizard79
    Sep 3, 2010 at 16:09
  • 1
    @Brian: There are still some libraries that require admin rights (such as developing for Azure), but a vast majority of tasks can be done as non-admin.
    – Agent_9191
    Sep 4, 2010 at 7:02
  • 2
    @Walter: you can create windows services un-elevated. You need elevated rights to install/uninstall the service though. You should never be installing something directly from the IDE anyways, so an elevated command prompt works better since that's what the IT Pros would end up using.
    – Agent_9191
    Sep 4, 2010 at 22:11
  • 2
    @zneak: you are wrong. From a technical point of view being a root user of an Administrator (or elevated admin with UAC) is exactly the same thing. Of course you can't use the format command on the system partition, but this is just a UI choice. You can use a third party program that formats of wipes out the system partition, or anything else.
    – Wizard79
    Sep 4, 2010 at 23:46

Regardless of whether you program with it on or off, you should test your program with a limited user account. This should catch most problems users might have with running your program with a limited account or the UAC turned-on.

  • The problem is that, if you have UAC OFF, you should have a dedicated machine or a virtual machine with it ON for the tests.
    – Wizard79
    Sep 3, 2010 at 16:42
  • Even if the UAC is off, a limited account would still let you test limited privileges.
    – Gelatin
    Sep 3, 2010 at 17:42
  • 2
    You need to test both unprivileged and privileged unelevated scenarios.
    – Ben Voigt
    Mar 5, 2011 at 1:42

I'm running on Windows 7 and I leave UAC on and my account isn't a true admin account. So when I bump into UAC, I have to enter the admin password to continue. Even under Vista I kept it on. I've heard a number of developers say it gets in the way, but I've yet to see that. Under Vista it was a bigger issue as several areas were a little too restrictive.

The question I always bring up when developers say UAC gets in the way is "What are you doing that you keep running into it?". If you are attempting to manipulate files in system folders (Windows, Program Files, IIS sites), you're doing something wrong. IIS websites can exist outside of C:\inetpub. SQL Server user databases can exist outside of Program Files. The only time you should regularly see the UAC prompt is application installs and updates. If you're seeing it more often you're likely working against the system rather than with it.

  • 2
    Visual Studio won't let you open an IIS hosted web application project unless it's running elevated.
    – Heinzi
    Feb 20, 2012 at 7:44
  • To extend @Heinzi's point, if I run two versions of the same application (e.g. two SVN branches which are each stored in a different location), you need VS studio to be able to set IIS to the correct folder that you're working in (i.e. the last solution you opened of these two). Without elevated privileges, not only do you have to update IIS manually, you run the risk of forgetting and testing a completely different version of the application (in the browser) than you're developing (in VS)
    – Flater
    Nov 14, 2019 at 15:48

IMHO, it boils down to what you are doing.

In my current job I dev web apps and windows services. Because of that I find my self more productive with it off. If I was working on apps that a user would install, I would leave it on so I could be as close as possible to what the user would experience.

  • How does leaving UAC off help? Web app development shouldn't require admin rights, except for setting up IIS initially. Windows services would require admin rights to start and stop, but through a single command window and net start/stop you have a single UAC prompt. Otherwise you should have the logic built so you have a command line runner and a Win Service runner.
    – Agent_9191
    Sep 4, 2010 at 22:08
  • It doesn't help with development, but it does take away the annoyance of UAC. If you don't need it for simulating low-access turn it off; otherwise leave it on
    – user81
    Sep 4, 2010 at 22:57
  • 2
    Debugging an web app hosted in IIS requires elevated privileges I believe.
    – FinnNk
    Oct 2, 2011 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.