Visual Studio Run as administrator shortcut

后端 未结 6 1816
甜味超标
甜味超标 2021-02-05 03:58

how do I create a shortcut that runs Visual Studio with Administrator rights?

Actually I have to navigate to the Visual Studio start menu folder, click on the icon with

6条回答
  •  难免孤独
    2021-02-05 04:36

    What I was looking for was a way of running Visual Studio Solution files (.sln) as Administrator. I just found a pretty good way of doing this...

    Place this content inside a file named RunAsAdministrator.reg:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\runas\Command]
    @="\"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\MSEnv\\VSLauncher.exe\" \"%1\""
    

    Double click the file to execute it.

    Now, when you right click a file you'll have the option of running it as Adminstrator like this:

    enter image description here

    Here's the full story by the AWESOME David Ebbo: Open your solution files as admin

提交回复
热议问题