views:

55

answers:

2

I have an application that works fine when run with administrator privileges. When run by a user it has problems reading from the Event Log. I would like to run the code in the debugger but not with my administrator settings. Is this possible in Visual Studio 2008 ?

+1  A: 

Right click on the Visual Studio icon and select Run as...:

alt text

There's also the runas.exe command you could use to start Visual Studio under a different account.

Darin Dimitrov
@Joshua, yes, that's why I proposed to run Visual Studio under a different account. The `runas` command allows you to specify any user. Didn't you understand my answer?
Darin Dimitrov
@Joshua: Darin wrote absolutly correct information. If you not yet knows RunAs I recommend you to read about it. It can be very helpfull sometimes. Moreover be not so quickly with downvoting of other questions. It's a bad habit.
Oleg
Is there's anyway of doing this w/o restarting VS?
Nissim
@Nissim, yes, look at [this thread](http://social.msdn.microsoft.com/Forums/en/vsdebug/thread/eeba26cb-2336-4a80-99f4-ca4167d0758c)
Darin Dimitrov
After looking at the question again (many, many times) I realized my answer would have been correct in the direction I read it as going, but the asker was wanting to go the other direction. Sorry about that. :)
Joshua
+1  A: 

In Visual Studio 2010 you can use VSCommands to debug with different permissions: Maybe it's time to upgrade ;)

alt text

Registered User
I'm now using 2010 so this will work for me. Many thanks.
Retrocoder