終極效果圖
1.添加自定義的Cmd命令【帶圖標】
1.1 打開運行 進入注冊表編輯器
快捷鍵 Win+R
打開運行,輸入 regedit
進入注冊表
1.2 注冊表進入對應路徑 新建項OpenCmd
計算機\HKEY_CLASSES_ROOT\Directory\Background\shell
Background
的 shell
目錄下新建項,取名 OpenCmd
1.3 cmd取名【此處就取名為cmd】
這里的取名就是鼠標實際右鍵時顯示打開cmd的名稱,如↓
1.4 給cmd命令賦值【2步走】
1.4.1 OpenCmd下新建 command
項
1.4.2 command項賦值【實際打開cmd的命令值】
cmd.exe -noexit -command Set-Location -literalPath \"%V\"
至此,基本的右鍵打開
cmd
的功能實現(xiàn),下面是附上右鍵cmd的圖標
1.5 添加右鍵cmd的圖標
實際就是找到cmd程序的位置,選則 cmd.exe 文件的 Icon 圖標
復制cmd的路徑
C:\Windows\system32
,后邊補上\cmd.exe
,組成最終 cmd 圖標的數(shù)值數(shù)據(jù)
具體的數(shù)值名稱和數(shù)值數(shù)據(jù)如下↓
切換到 OpenCmd
項下,在空白頁右鍵新建 字符串值(S)
數(shù)值名稱:Icon
數(shù)值數(shù)據(jù):C:\Windows\system32\cmd.exe
至此cmd圖標添加完成,效果如下↓
2.添加自定義的Powershell命令【帶圖標】
2.1 注冊表進入對應路徑 新建項OpenPowershell
計算機\HKEY_CLASSES_ROOT\Directory\Background\shell
Background
的 shell
目錄下新建項,取名 OpenPowershell
2.2 powershell取名【此處就取名為powershell7】
因個人用的是Powershell7的版本,故取名 powershell7
這里的取名就是鼠標實際右鍵時顯示打開powershell的名稱,如↓
2.3 給cmd命令賦值【2步走】
2.3.1 OpenoPowershell下新建 command
項
2.3.2 command項賦值【實際打開powershell7的命令值】
此處注意,如果是默認Powershell,版本會是Powershell5.x
但此處本機已升級Powershell7.x【如下圖】
所以實際打開powershell5.x的命令值與powershell7.x會有所區(qū)別
具體區(qū)別如下↓
Powershell5.xpowershell.exe -noexit -command Set-Location -literalPath \"%V\"
Powershell7.xpwsh.exe -noexit -command Set-Location -literalPath \"%V\"
可復制代碼塊↓
powershell.exe -noexit -command Set-Location -literalPath \"%V\"
pwsh.exe -noexit -command Set-Location -literalPath \"%V\"
至此,基本的右鍵打開 powershell
的功能實現(xiàn),下面是附上右鍵powershell的圖標文章來源:http://www.zghlxwxcb.cn/news/detail-856182.html
2.4 添加右鍵powershell7的圖標
切換到 OpenPowershell
項下,在空白頁右鍵新建 字符串值(S)
數(shù)值名稱:Icon
數(shù)值數(shù)據(jù):Powershell5.x C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Powershell7.x C:\Program Files\PowerShell\7\pwsh.exe
至此powershell圖標添加完成,效果如下↓文章來源地址http://www.zghlxwxcb.cn/news/detail-856182.html
到了這里,關于鼠標右鍵添加自定義Cmd與Powershell【最全 最詳細 含圖標Icon】的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!