Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
add comment

4 Answers

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

First of all, it let 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 wise will tell you why that's bad).

share|improve this answer
3  
Windows is not linux, that's not really a good comparison .. –  Andreas Bonini Sep 3 '10 at 16:02
8  
@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. –  Lorenzo Sep 3 '10 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 '10 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 '10 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. –  Lorenzo Sep 4 '10 at 23:46
show 5 more comments

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.

share|improve this answer
1  
Visual Studio won't let you open an IIS hosted web application project unless it's running elevated. –  Heinzi Feb 20 '12 at 7:44
add comment

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.

share|improve this answer
    
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. –  Lorenzo Sep 3 '10 at 16:42
    
Even if the UAC is off, a limited account would still let you test limited privileges. –  Gelatin Sep 3 '10 at 17:42
1  
You need to test both unprivileged and privileged unelevated scenarios. –  Ben Voigt Mar 5 '11 at 1:42
add comment

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.

share|improve this answer
    
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 '10 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 –  Joe Sep 4 '10 at 22:57
1  
Debugging an web app hosted in IIS requires elevated privileges I believe. –  FinnNk Oct 2 '11 at 9:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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