views:

1817

answers:

6

I have switched to Vista recently and I wanted to keep UAC turned on, as I agree it increases computer security a lot. Some developer tools I use regularly require running elevated:

  • PIX for Windows
  • Visual Studio 2005 (elevated privileges seem to be needed for debugging and for IncrediBuild to work)
  • mapped and substed drives: The elevated process does not seem to see the drives I have mapped in my user account. This article describes the problem, but I am not sure how could I implement its final suggestion to "map these drives in the context of the elevated login".

I have experimented with many suggestions I have found, Compatibility Administrator seemed quite promising, but the result was still not what I wanted. When I used RunAsInvoker, there was no UAC prompt, but the Visual Studio did not work. When I used RunAsAdmin or RunAsHighest, it worked, but there was the prompt.

Is there any way how to teach UAC to remember some particular application should always run elevated and never prompt me about this, or some other way how to allow me launching VS elevated without the prompt? If there is no way to do it, does there exist some security reason why it cannot be done?

A: 

For the record, my current "solution" to this problem, after a few days of experimenting with it, is:

  • turn UAC off
  • make sure somebody else tests the application with a Standard User Acount on a regular basis

... i.e. use the same pattern which worked in WindowsXP before.

I would like to see some other solution, but so far nothing I have tried gave me all of what I want, i,e. UAC on, Visual Studio working and no prompt on running VS. I would like to keep UAC on, but it was too annoying for me to confirm the elevation every time I run the tools.

Suma
+1  A: 

As far as I'm aware, you can't get everything you want (UAC on, VS working without prompts).

However, there's a better workaround than "have someone else test it with LUA:" A Virtual PC. Use Virtual PC (free from Microsoft) to create a guest operating system. Install Vista and set up a regular user as well as your default admin. Test your apps on that VPC using the regular (non-elevated) user. This at least gives you the early indication of LUA issues without too many major headaches.

I agree that it's a bit of a pain (and I've noticed VS2008 doesn't bug me with UAC prompts under Vista nor Win7 beta), but it is what it is. VS2005, particularly in debugging, requires elevation to attach to processes, etc.

John Rudy
This does not address my main concern, that is having UAC on for my workstation.Still I would be interested to know - if I would install a virtual PC, would it allow me to:- run DirectX applications (which is what I am developing)- debug the process running on the VPC from my Visual Studio?
Suma
Your comment about VS2008 is interesting. Perhaps this might be the solution - to upgrade to VS2008? Can you debug with VS2008 when not running elevated?
Suma
DirectX in VPC is going to suck royally. You MIGHT be able to do it, but your performance will be down the tubes. You're a special case, and you may have a more difficult time. Is it possible to just set yourself up with a standard user account for running the app for LUA testing?
John Rudy
(Which would be separate from debugging, you'd still need elevation for that.) Speaking of debugging, I'm not 100% sure, only because my shop hasn't fully switched over to VS2008 yet. (I have it installed, but no one's using it actively -- we're maintaining old projects in vs2005 currently.)
John Rudy
Yes, I can set myself another LUA on my computer, but actually it is easier for me to let testers and other co-workers (who do not perform debugging or run Visual Studio) to do this.
Suma
You may, sadly, be stuck in that world. :(
John Rudy
+2  A: 

Unfortunately UAC prompt is mandatory in windows Vista, when UAC is enabled.

One solution that worked for me is to have a elevated command line and a bunch of non-ui shell scripts that run elevated from there for some tasks.

Also to debug I've setup another computer in which I can run a remote debugging session, it is a bit tricky to configure with VS 2005, the plus is that if you crash/hang the remote session it didn't crash your main computer :)

PD: VS 2008 is slightly nicer in vista than VS 2005 give it a try if you can.

Ismael
"UAC prompt is mandatory in windows Vista" - No it's not. you can turn it off on Control Panel.
Duncan Smart
But if you have UAC enabled then it is mandatory. The question was about disabling the prompt but keeping UAC enabled, sorry if I was not clear..
Ismael
In that case there's a "silently elevate" option you can enable using gpedit.msc or secpol.msc - the "no prompt" option as detailed here: http://technet.microsoft.com/en-us/library/cc507861.aspx
Duncan Smart
+2  A: 

VS 2005 was a pain in Vista, and there's a lot of little gotchas even when running as administrator. See if you can upgrade to 2008, which works a lot better on Vista.

David Thornley
+1  A: 

I've had to turn UAC off for my 2008 dev system also, despite similar feelings about wanting to be able to use it. It's just too painful to need to keep track of the running context of every single application in order for things like drag/drop between windows to work, or interacting with remote systems, or debugging scenarios, or any number of other tasks. UAC was a good idea in theory, but there seems to have been so little effort put in to making it functionally useful for real-world power users, that at the end of the day, the only feasible solution is to disable it entirely.

Windows 7 will purportedly be somewhat better with eliminating the constant prompts, but unless they really work to address all the cross-application and remote access issues, it's still going to be a non-starter for anyone other than novice users. Here's to hoping they eventually get it to be actually usable.

Nick
OMG yes, the cross-application issues are the worst :(. I hate not being able to drag-drop from VS to the file system when running as administrator.
Domenic
A: 

Norton has an interesting tool to de-tune UAC and make it a little easier to live with...at the cost of feedback about what programs you run going to Norton. There is a good write-up about it here:

http://www.betanews.com/article/New_Norton_Vista_tool_trades_UAC_for_online_feedback/1223668881

The download is here:

http://www.nortonlabs.com/inthelab/uac.php

Finally, there is an interesting little tool to "snooze" UAC which costs $5 (30 Day trial). I can't vouch for either tool as I have not tried them personally.

http://www.uacsnooze.com/