I have an application that is intended to run without admin rights, but it fails in that scenario. I tried to run my app as administrator, and it runs. But that's not what I want.
What I want is a way to debug my application without administrator privileges, so that I can determine what is causing it to fail when running as a normal user... so that I at least know what is the cause, and possibly make it in a way that runs without admin rights.
Whenever I run Visual Studio 2015, it starts with Administrator privileges. No way to get rid of that (Administrator)
in title bar:
I have tried runas /netonly /user:User devenv.exe
to no avail:
If I try to run VS2015 under another more restricted account, it say that it needs Administrative privileges, and does not run:
Clicking "Cancel the task ad return to Visual Studio" won't return to VS, instead it will close.
The problem is that when I run my application without admin privileges it does not open. No messages. Nothing. But when I try to debug it inside Visual Studio it runs... because VS itself only runs as administrator.
Is there a way to debug without admin rights?
From one day to the other I faced the same issue with VS 2019.
Change ownership of the devenv.exe
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
):
devenv.exe
> Properties Now Visual Studio is launched without administrator rights and therefore also the debugging.
Unfortunately, this must be done after every update.
If you right click on the shortcut and select properties, then select the shortcut tab, there is an advanced button. Click that and you can then select he application to not start in admin mode. Also, be aware that if you are using iis you will need VS to be running in admin mode to debug.
There is something wrong with your Visual Studio installation. It can for sure run without admin. However, you can work around this.
If your app fails very quickly this will of course not work, and you will instead need to look into your Visual Studio setup.
So the issue is that it still opened the VS as the admin even if you just open the blank VS IDE in your side, am I right?
Please make sure that you don't enable "The program requires additional permissions" under Troubleshoot compatibility or the property settings for the VS IDE shortcut or the devenv.exe:
https://blog.devoworx.net/2016/01/06/this-task-requires-the-application-to-have-elevated-permissions/
https://superuser.com/questions/547810/how-to-turn-off-always-run-as-administrator-windows-8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With