Giter Club home page Giter Club logo

runasadmin's Introduction

RunAsAdmin

Visual Studio extension to run Visual Studio as administrator

Build Status Sponsor

Installing

Visual Studio Marketplace Visual Studio Marketplace

Github Releases

Open VSIX Gallery

Run Visual Studio as administrator

  1. Install the RunAsAdmin extension
  2. Go to Tools -> Options -> RunAsAdmin
  3. Set Enabled to true
  4. Restart Visual Studio

Run Visual Studio as normal user

  1. Go to Tools -> Options -> RunAsAdmin
  2. Set Enabled to false
  3. Restart Visual Studio

Uninstalling the extension

When uninstalling the extension the current elevation mode will be preserved. If you have the extension Enabled in the options and uninstall it, Visual Studio will remain running as administrator. You have to use the RunAsAdmin options setting to enable or disable.

Disabling the extension

When disabling the extension from within the Visual Studio extensions dialog nothing will happen like with uninstalling the extension. You have to use the RunAsAdmin options setting to enable or disable.

Under the hood

The extension adds two registry entries at the following location: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\

One for the path to Visual Studio and one for the path to the Visual Studio Launcher. The value of the registry entries will be "RUNASADMIN" or "RUNASNORMAL"

Thanks

Cazzulino - How to get Visual Studio 2017 installation path

Rick van den Bosch - Running Visual Studio as an administrator causes ‘Save changes to devenv.sln’ when double clicking solutions

runasadmin's People

Contributors

sboulema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

runasadmin's Issues

The version 1.2.4 can't start on VS2015 when VS2017 is not install

Hi !

After update to the last version the RunAsAdmin load failed with this error :

CreateInstance failed for package [RunAsAdminPackage]Source: 'mscorlib' Description: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. Le fichier spécifié est introuvable. System.IO.FileNotFoundException: Impossible de charger le fichier ou l'assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. Le fichier spécifié est introuvable. Nom de fichier : 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' à System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) à System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) à System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) à System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) AVT : la journalisation de liaison d'assembly est désactivée. Pour activer la journalisation des échecs de liaison d'assembly, attribuez la valeur 1 à la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD). Remarque : une certaine perte de performance est associée à l'enregistrement dans le journal des échecs de liaison d'assembly. Pour désactiver cette fonctionnalité, supprimez la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog].

Best regard's

SetSite failed for package [RunAsAdminPackage]Source. Is anyone else having this issue?

SetSite failed for package [RunAsAdminPackage]Source: 'Microsoft.VisualStudio.Shell.14.0'
Description: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class. You should instead call GetServiceAsync (without calling Result
or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService.
System.InvalidOperationException: Due to high risk of deadlock you cannot call GetService from a background thread in an AsyncPackage derived class.
You should instead call GetServiceAsync (without calling Result or Wait on the resultant Task object) or switch to the UI thread with the JoinableTaskFactory.SwitchToMainThreadAsync method before calling GetService.
at Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType)
at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)
at Microsoft.VisualStudio.Shell.Package.PackageContainer.GetService(Type serviceType)
at System.ComponentModel.Container.Site.GetService(Type service)
at System.ComponentModel.Component.GetService(Type service)
at Microsoft.VisualStudio.Shell.DialogPage.get_SettingsMananger()
at Microsoft.VisualStudio.Shell.DialogPage.LoadSettingsFromStorage()
at Microsoft.VisualStudio.Shell.DialogPage.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Container.Add(IComponent component)
at Microsoft.VisualStudio.Shell.Package.GetDialogPage(Type dialogPageType)
at SamirBoulema.RunAsAdmin.RunAsAdminPackage.<InitializeAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at Microsoft.VisualStudio.Services.VsTask.GetResult()

Broke my mouse button customization as well as my AutoHotKey settings.

I installed this plugin on a whim, more-or-less; but once install neither my mouse middle-button's double-click (via http://Support.Logitech.com/en_us/software/setpoint) nor my AutoHotKey macros (http://AutoHotKey.com) were working... which I use frequently for editing code. I tried disabling and deleting your extension but (Admin) still appeared in the titlebar and I could not get my coding enhancements back. I found http://StackOverflow.com/a/1905257/1424959 and then ran a windows compatibility troubleshooter to set my preferences at windows 8 and now have my titlebar like before and my mouse and keyboard able to fully engage the code... but it would be better if this plugin uninstalled fully as I'm not sure that a windows 8 environment is what's best form my vs2017 project.

Any advise on if I need to / how to get my vs2017 running without admin privileges and in a win 10 settings is greatly appreciated.

environment is ignored

I run VS through a .bat file that first sets some environment variables needed for build. When using RusAsAdmin, the environment is lost.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.