PhpStorm - run terminal (cmd) as administrator
Asked Answered
C

1

15

On Windows it's easy to run cmd application as administrator:

Right click on cmd icon >> run as administrator`

But I would like to use PhpStorm terminal tool as administrator since I constantly have to execute queries that require administrator role.

When I open:

File >> Settings >> Tools >> Terminal

I can see that it is directly connected to cmd.exe and there are options to be filled:

enter image description here

And I see no checkbox with choice to run it as administrator.

QUESTIONS

  1. Is it even possible?
  2. If yes how do I do it?
  3. Using settings or other way?
Centurion answered 4/1, 2017 at 11:4 Comment(3)
Would this not be covered by running PhpStorm itself as an administrator?Longwood
Wow that was the solution. Didn't even pop to my head. Thanks!Centurion
Didn't work for me using webstorm 2016.2 Terminal appears not to be started with admin rights although webstorm was. Have to use a bog-standard windows terminal with admin rights to issue 'ionic serve'Cati
S
21

There are no options in the IDE for running the shell (cmd.exe, powershell.exe etc.) with higher rights at the moment.

https://youtrack.jetbrains.com/issue/IDEA-121335 -- watch this ticket (star/vote/comment) to get notified on any progress. Maybe someone will post some possible workarounds there...


Your only option for now (that I'm aware of) is running the IDE itself as Administrator. I have tried this myself and the Process Hacker tool confirms that both the IDE and cmd.exe will be run with elevated rights.


P.S. For one time execution (or if you need to run the IDE as normal user): have a look at this question and offered solutions: How to open an elevated cmd using command line for Windows?

Staub answered 4/1, 2017 at 11:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.