Reputation: 1951
I'm sure that this question has already been answered somewhere, but it seems that I am unable to find the answer.
I created a manifest file for my project and set the requestedExecutionLevel
to requireAdministrator
. When I double click my binary in Windows Explorer, then the UAC opens and asks me for admin privileges. But when I want to debug my application within Visual Studio, it doesn't ask for admin privileges. It simply runs as "normal" user.
I already wrote a little script into the startup of my application that determines whether the application has admin privileges or not and restarts itself (with "runas" as verb), if it hasn't got admin privileges. The disadvantage of this method is that the debugger isn't attached to the restarted application. Is there a way to debug an application with admin rights? (Maybe without starting VS with admin rights)
Upvotes: 0
Views: 890
Reputation: 3556
If you are using Visual Studio 2013 Update 2, I have experienced exactly the same problem and actually, it is an known issue of VS2013.
I updated to VS2013.3 RC and then the problem has gone. So I think this issue is fixed in Update 3.
Upvotes: 1