"Open in Windows Terminal as administrator" context menu option #14952

Closed
opened 2026-01-31 04:24:03 +00:00 by claunia · 7 comments
Owner

Originally created by @tanuj-05 on GitHub (Aug 24, 2021).

Open here as administrator option in context menu

When a user right clicks inside a folder, presently only "Open in Windows Terminal" is shown. But it will be better if a "open in Windows Terminal as Administrator" option is available also , how it is implemented for Powershell 7.

Originally created by @tanuj-05 on GitHub (Aug 24, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Open here as administrator option in context menu <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # When a user right clicks inside a folder, presently only "Open in Windows Terminal" is shown. But it will be better if a "open in Windows Terminal as Administrator" option is available also , how it is implemented for Powershell 7. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 04:24:04 +00:00
Author
Owner

@unnati914 commented on GitHub (Aug 24, 2021):

could i work on this?

@unnati914 commented on GitHub (Aug 24, 2021): could i work on this?
Author
Owner

@tanuj-05 commented on GitHub (Aug 24, 2021):

could i work on this?

yes sure

@tanuj-05 commented on GitHub (Aug 24, 2021): > could i work on this? yes sure
Author
Owner

@unnati914 commented on GitHub (Aug 24, 2021):

hey.. what i was thinking was to add a m- in front of the file name that you want to run as admin .. Is my approach correct?

@unnati914 commented on GitHub (Aug 24, 2021): hey.. what i was thinking was to add a m- in front of the file name that you want to run as admin .. Is my approach correct?
Author
Owner

@unnati914 commented on GitHub (Aug 24, 2021):

[HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin]
"HasLUAShield"=""
"MUIVerb"="Open in Windows Terminal as administrator"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout]
"MUIVerb"="Default Profile"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout\command]
@="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','"""%V"""')""

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout]
"MUIVerb"="Command Prompt"
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout\command]
@="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','"""Command Prompt"""','-d','"""%V"""')""

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout]
"MUIVerb"="PowerShell"
"HasLUAShield"=""
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout\command]
@="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','"""Windows PowerShell"""','-d','"""%1"""')""

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHereAsAdmin]
"HasLUAShield"=""
"MUIVerb"="Open in Windows Terminal as administrator"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout]
"MUIVerb"="Default Profile"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout\command]
@="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','"""%V"""')""

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout]
"MUIVerb"="Command Prompt"
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout\command]
@="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','"""Command Prompt"""','-d','"""%V"""')""

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout]
"MUIVerb"="PowerShell"
"HasLUAShield"=""
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout\command]
@="powershell.exe -WindowStyle
Or something like this?

@unnati914 commented on GitHub (Aug 24, 2021): [HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin] "HasLUAShield"="" "MUIVerb"="Open in Windows Terminal as administrator" "Extended"="" "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout] "MUIVerb"="Default Profile" "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\001flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout] "MUIVerb"="Command Prompt" "Icon"="imageres.dll,-5324" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\002flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Command Prompt\"\"\"','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout] "MUIVerb"="PowerShell" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHereAsAdmin\shell\003flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Windows PowerShell\"\"\"','-d','\"\"\"%1\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHereAsAdmin] "HasLUAShield"="" "MUIVerb"="Open in Windows Terminal as administrator" "Extended"="" "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout] "MUIVerb"="Default Profile" "HasLUAShield"="" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\001flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout] "MUIVerb"="Command Prompt" "Icon"="imageres.dll,-5324" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\002flyout\command] @="powershell.exe -WindowStyle Hidden \"Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','\"\"\"Command Prompt\"\"\"','-d','\"\"\"%V\"\"\"')\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout] "MUIVerb"="PowerShell" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHereAsAdmin\shell\003flyout\command] @="powershell.exe -WindowStyle Or something like this?
Author
Owner

@zadjii-msft commented on GitHub (Aug 24, 2021):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9903 for more discussion.

/dup #9903

More importantly, we'd like to also do #6111 first, so that people can configure how they want the context menu set up.

@zadjii-msft commented on GitHub (Aug 24, 2021): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9903 for more discussion. /dup #9903 More importantly, we'd like to also do #6111 first, so that people can configure how they want the context menu set up.
Author
Owner

@ghost commented on GitHub (Aug 24, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Aug 24, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@akopetsch commented on GitHub (Feb 25, 2025):

I've created a workaround that adds an 'Open in Terminal as administrator' option to the extended context menu in Windows Explorer. You can find it here: akopetsch/WindowsTerminalAdmin.

@akopetsch commented on GitHub (Feb 25, 2025): I've created a workaround that adds an 'Open in Terminal as administrator' option to the extended context menu in Windows Explorer. You can find it here: [akopetsch/WindowsTerminalAdmin](https://github.com/akopetsch/WindowsTerminalAdmin).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14952