Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 debug as administrator [duplicate]

I am writing a program in c# that requires it to be run as administrator only when certain actions are taken.

When the user clicks a button it checks if the application is running as an administrator and if it is not than it restarts the application as an administrator.

I don't want it to require admin access all the time since most of the application can be used without it.

The problem I am having is when I try to debug the application in VS2013 and click a button that requires admin access it restarts the program and Visual Studio stops debugging it.

Is there a setting or a debug configuration that will allow VS to always start debugging as administrator?

like image 888
Tony Brix Avatar asked Jul 31 '26 09:07

Tony Brix


1 Answers

Try this solution apply setting for shortcut (away run with administrator)

right click icon visual studio -> properties -> (Tab) Compatibility -> (Group) Setting -> (check) Run this program as an administrator -> Apply -> OK.

like image 118
HoangHieu Avatar answered Aug 02 '26 00:08

HoangHieu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!