I need vs.net to always run as administrator.
I can't click on
.sln files because it won't run as administrator.
So I have to manually click on the vs.net icon, run as administrator, and THEN open a solution file.
You can set the shortcut to always open as administrator.
Edit: This will make Visual Studio run as an administrator for the shortcut you do this on. To have Visual Studio to always open as an administrator, follow @Vdex's instructions.
I assume it is done the same way as in Vista:
Got to the actual deven.exe in "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\", right click on devenv.exe, properties, compatibility and tick "run as administrator"
When you click on a .sln file, C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\vslauncher.exe is run.
If you set visual studio (devenv.exe) to always run as administrator, vslauncher won’t be able to run visual studio. Instead, you need to set just vslauncher to run as admin:
A windows update will keep vslauncher from launching devenv as admin. If after setting vslauncher to admin Visual Studio still doesn't launch as admin, you need to
Next, you want manually launching Visual Studio to also run as administrator. To do this,
Make sure you do it via the Shortcut tab. If you do the same thing via the Compatability tab, it will set it on the underlying executable, and double clicking solution files won’t work right anymore.
You also need to set the following to run as an administrator:
C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLauncher.exe
None of these solutions offered here work for double-clicking a .sln file and having that open an instance of Visual Studio that runs as administrator. I'll give someone $50 if they can tell me how to launch an .sln w/ VS in admin mode.
OK - I believe I found a way around this. You have to do two things (in my case, 3, because I have VS 2008 and VS 2010 installed, and I don't EVER, EVER want either version to run without admin rights).
1) Navigate to program files location of the devenv.exe and set it to run as admin (see other post w/ screenshot re: how to do this).
2) Navigate to (I'm using WIN7 64-bit) C:\Program Files (x86)\Common Files\microsoft shared\MSEnv and find the VSLauncher.exe. Right-click > Properties... > Compatibility > Check the Run this program as Administrator box > OK
3) Navigate to any .sln > Right-click > Open with > Microsoft Visual Studio Version Selector
Performing these steps worked for me.
Use the same property window and set Windows Explorer (or any other file managers you are using, such as FAR) to run as an administrator.
The privileges granted to Windows Explorer will be applied to a .sln file you start by double-clicking on it.
the solution posted at the link below worked for me:
To sum up you need to: