I am working on a project that is hosted in IIS, and therefore, to debug this site, I have to start Visual Studio as an administrator.
The problem is that when I open the file in Windows Explorer, I would like to open it in the current instance of Visual Studio (or in a new instance if it is not).
I had partial success using a batch file with the following contents:
cd "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE"
devenv /Edit %1
However, this opens Visual Studio as the current user, NOT as an administrator (therefore, when I have an instance already open as an administrator, it still opens a new instance).
So the question is: how can I open the file in the current instance as an administrator?
source
share