Skip to content

Instantly share code, notes, and snippets.

@espresso3389
Created January 26, 2018 03:52
Show Gist options
  • Save espresso3389/5f5e8936e6f186ce6c3497c3c4d9d53c to your computer and use it in GitHub Desktop.
Save espresso3389/5f5e8936e6f186ce6c3497c3c4d9d53c to your computer and use it in GitHub Desktop.
Registry patch to enable powershell with administrative privilege
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="PowerShell ウィンドウをここに開く(管理者)"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="PowerShell ウィンドウをここに開く(管理者)"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:006698a6
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="powershell.exe -noexit -command Set-Location '%V'"
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\runas]
@="PowerShell ウィンドウをここに開く(管理者)"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\runas\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CURRENT_USER\Software\Classes\LibraryFolder\Background\shell\cmdhere]
@="PowerShell ウィンドウをここに開く(管理者)"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CURRENT_USER\Software\Classes\LibraryFolder\Background\shell\cmdhere\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CURRENT_USER\Software\Classes\LibraryFolder\Background\shell\runas]
@="PowerShell ウィンドウをここに開く(管理者)"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CURRENT_USER\Software\Classes\LibraryFolder\Background\shell\runas\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment