Right-click addd “cmd_here”
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here]
@=”cmd_here”
“Icon”=”cmd.exe”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here\command]
@=”\”C:\\Windows\\System32\\cmd.exe\””
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmdPrompt]
@=”cmd_here”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmdPrompt\command]
@=”\”C:\\Windows\\System32\\cmd.exe\” \”cd %1\””
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd_here]
@=”cmd_here”
“Icon”=”cmd.exe”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd_here\command]
@=”\”C:\\Windows\\System32\\cmd.exe\””
Right-click addd “PowerShellAsAdmin”
Windows Registry Editor Version 5.00
; Created by:Shawn Brink
; Created on: August 13, 2016
; Updated on: December 20, 2023
; Tutorial: https://www.tenforums.com/tutorials/60177-add-open-powershell-window-here-administrator-windows-10-a.html
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin]
@=”Open PowerShell window here as administrator”
“Extended”=-
“HasLUAShield”=””
“Icon”=”powershell.exe”
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShellAsAdmin\command]
@=”cmd /c reg add hkcu\\software\\_dir /d \”%v\” /f & start powershell -WindowS H -noP -c Start-Process -v RunAs powershell.exe ‘-noL -noE -c cd -literalP (gp hkcu:\\software\\_dir).\\\”\\\”\\\”(default)\\\”\\\”\\\”; ri hkcu:\\software\\_dir'”
[HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin]
@=”Open PowerShell window here as administrator”
“Extended”=-
“HasLUAShield”=””
“Icon”=”powershell.exe”
[HKEY_CLASSES_ROOT\Directory\shell\PowerShellAsAdmin\command]
@=”cmd /c reg add hkcu\\software\\_dir /d \”%v\” /f & start powershell -WindowS H -noP -c Start-Process -v RunAs powershell.exe ‘-noL -noE -c cd -literalP (gp hkcu:\\software\\_dir).\\\”\\\”\\\”(default)\\\”\\\”\\\”; ri hkcu:\\software\\_dir'”
[HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin]
@=”Open PowerShell window here as administrator”
“Extended”=-
“HasLUAShield”=””
“Icon”=”powershell.exe”
[HKEY_CLASSES_ROOT\Drive\shell\PowerShellAsAdmin\command]
@=”cmd /c reg add hkcu\\software\\_dir /d \”%v\” /f & start powershell -WindowS H -noP -c Start-Process -v RunAs powershell.exe ‘-noL -noE -c cd -literalP (gp hkcu:\\software\\_dir).\\\”\\\”\\\”(default)\\\”\\\”\\\”; ri hkcu:\\software\\_dir'”
[-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\PowerShellAsAdmin]
; To allow mapped drives to be available in elevated PowerShell
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
“EnableLinkedConnections”=dword:00000001