Hyper: Windows 10: Run Shell As Administrator

Created on 20 Apr 2017  路  13Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

Issue


Hi,

Feature Request OR Help Wanted:

I spend a lot of time in elevated Command Prompt's & PowerShell's working with Docker. I really want to use Hyper but I have not found a good way to launch Hyper to Command Prompt or PowerShell with admin privileges.

I have tried the following several ways with different syntax (not shown in .hyper.js)and still come up short. Maybe someone can show me the way here or possibly we need a new feature.

  • Track down cmd.exe and try to set to always admin.

    • Fail

  • Track down powershell.exe and try to set to always admin.

    • Fail

  • Modify shortcuts to run as administrator & call shortcut from .hyper.js.

    • Fail

Any help is appreciated & thanks for Hyper its very cool.

馃憖 Awaiting Response

Most helpful comment

Use Ctrl-Shift Left-Click when launching with the mouse, or if typing when searching from the start menu, Ctrl-Shift-Enter. You should see the User Account Control dialog to give Hyper permission to launch as admin. IIRC, this was introduced in Windows 7.

All 13 comments

Thanks @MartyGentillon looks like a potential solution. I would also bank on MS addressing this in the next few years given there renewed focus on the shell.

Use Ctrl-Shift Left-Click when launching with the mouse, or if typing when searching from the start menu, Ctrl-Shift-Enter. You should see the User Account Control dialog to give Hyper permission to launch as admin. IIRC, this was introduced in Windows 7.

did you get this working? @jonwilks

@albinekb - I did not try sudo for Windows. I ended up going with ConEmu and configuring it to default to an admin PowerShell

I know this is closed but if anybody wants a solution without changing.

Tested on Windows 10:

  1. Open the start menu and search for hyper
  2. Right click on the entry and select "Open file location"
  3. Right click on the shortcut and select properties
  4. Select Compatibility
  5. Under settings check "Run this program as an administrator"

Now hyper will start in admin mode.

@nnyegaard Actually I think that's for running as admin when your in compatibility mode. Instead:

// previous steps

  1. Click Advanced...
  2. Check "Run as Administrator"

@HauntedSmores I don't see the "Run as Administrator" under Advanced.

Is there any problems with running in compatibility mode?

Maybe under Security something needs to be changed?

@nnyegaard Really? Just to be clear its the Advanced button in the Shortcut tab. Its 1 of only two things in the advanced dialogue for me. I have no idea if there's any detriments to running in compatibility mode, but I wouldnt want to run something in a mode set for a different version of windows if I dont have to.

@HauntedSmores Ah found it under Shortcut tab.

Thanks for the info!

In summary:

  1. Open the Start menu and search for hyper
  2. Right click on the entry and select "Open file location"
  3. Right click on the shortcut and select "Properties"
  4. Click "Advanced..." under the "Shortcut" tab
  5. Click "Run this program as an administrator"

Now hyper will start in admin mode.
screenshot_25

i would prefer it if hyper could just launch certain tabs as administrator. running everything as admin seems wildly over the top.

Using CMDER into hyper js you can run power shell as administrator without great efforts. Just configure cmder to run as administrator as default and then redirect hyper js to open it.

Cmder on Hyper

Was this page helpful?
0 / 5 - 0 ratings