New
#1
PS Context Menu Entry to Run Script as Administrator Without Exiting
Edit: I figured it out. All you needed to do was add:
Powershell.exe -WindowStyle Hidden -Command "& {Start-Process powershell.exe -ArgumentList '-nologo -noexit -command ""& {set-location (split-path ''"""%1"""'' -parent) ; & ''"""%1"""''}""' -verb runAs}"
this line to the registry entry at the key:
Computer\HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\.ps1\shell\RunasAdministratorNoEx it\command
Last edited by JohnTravolski; 19 Jul 2018 at 14:38.