码迷,mamicode.com
首页 > Windows程序 > 详细

Windows Terminal添加到右键菜单

时间:2020-05-01 10:34:48      阅读:293      评论:0      收藏:0      [点我收藏+]

标签:term   jin   str   右键菜单   tps   root   pre   users   ros   

给出我的注册表reg文件内容

Windows Registry Editor Version 5.00

; Windows terminal

[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"


[HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"

[HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"

[HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"

[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"

; Windows Terminal SUDO

[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"


[HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"

[HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"

[HKEY_CLASSES_ROOT\Drive\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"

[HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\MenuWindowsTerminalSudo]
"MUIVerb"="Windows Terminal (Admin)"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminalSudo"

; Subcommands

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD]
"MUIVerb"="CMD"
"ExtendedSubCommandsKey"=-
"Icon"="imageres.dll,-5323"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\CMD\command]
@="C:\\Users\\ligong\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"cmd\" -d ."

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell]
"MUIVerb"="Windows PowerShell"
"ExtendedSubCommandsKey"=-
"Icon"="imageres.dll,-5372"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Powershell\command]
@="C:\\Users\\ligong\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Windows PowerShell\" -d ."

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu]
"MUIVerb"="Ubuntu"
"ExtendedSubCommandsKey"=-
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminal\shell\Ubuntu\command]
@="C:\\Users\\ligong\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe -p \"Ubuntu\" -d ."

; Subcommands Sudo

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
"MUIVerb"="CMD"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\CMD]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"cmd\" -d ."

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell]
"MUIVerb"="Windows PowerShell"
"HasLUAShield"=""
"Icon"="imageres.dll,-5373"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Powershell\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Windows PowerShell\" -d ."

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu]
"MUIVerb"="Ubuntu"
"HasLUAShield"=""
"Icon"="C:\\Program Files\\WindowsApps\\CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuWindowsTerminalSudo\shell\Ubuntu\command]
@="cmd.exe /s /c pushd \"%V\" & start wt -p \"Ubuntu\" -d ."

要注意的是,部分要替换为自己的用户名。
配置ubuntu和windows terminal要注意自己的版本。
比如凡是出现这样的字段

CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc\\ubuntu.exe

里面的2004.2020.424.0都要根据版本的情况设定。
还有这里

Microsoft.WindowsTerminal_0.11.1191.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe

里面的0.11.1191.0_x64换成自己的版本。
那怎么看里面的情况呢?
首先取得权限:Win10下WindowsApps权限怎么获取-百度经验
然后找到这个文件夹的名字
技术图片
技术图片
最终效果图
技术图片
参考:

Windows Terminal添加到右键菜单

标签:term   jin   str   右键菜单   tps   root   pre   users   ros   

原文地址:https://www.cnblogs.com/lingr7/p/12812507.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!