I'm running VS2K8 in Win7 64-bit. I'm logged in as admin and I'm running it as admin, but the program I'm working on fails with access denied when I call a restricted API. If run the program from Explorer with "Run as Administrator" it works.

I was under the belief that VS2K8 debugs programs with whatever rights VS2K8 itself is running with. As it stands I can't debug my application due to this and I'm at a loss as to what's going on.

link|improve this question
feedback

2 Answers

Although you are logged on ad admin, any program you run in Win7 has reduced permissions. Therefore, even an admin needs to use "Run as Administrator" to run with full permissions.

To find out if that's what's going on, turn UAC off and see if this fixes the problem.

While this is normally frowned upon, I personally find it impossible to have UAC on when doing quite a few advanced manipulations on my computer.

link|improve this answer
I haven't had any problems debugging applications on my machine so far, though. Even with UAC enabled and running as a standard user. – Joey Jun 20 '10 at 20:01
@Johannes Rössel: Me neither, but we don't know his exact configuration. This looks like a permissions problem, and UAC is normally to blame for "Run as Administrator" problems. – harrymc Jun 21 '10 at 6:19
1  
Re-reading the question, it probably is enough when running VS with administrative privileges. They explicitly stated that “was under the belief that VS2K8 debugs programs with whatever rights VS2K8 itself is running with” – VS running as normal user simply cannot debug an application running as another user so that should suffice, I think. – Joey Jun 21 '10 at 8:33
@Johannes Rössel: Where in the post do you see running as another user? – harrymc Jun 21 '10 at 10:01
“with whatever rights VS2K8 itself is running with” points either to a different user or a restricted token. At least I read it like that. – Joey Jun 21 '10 at 17:45
show 3 more comments
feedback

For those of you who do not see any problem, try installing a Windows Service from your app without elevated privileges. this will require you to run the app with admin privileges.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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