新增右鍵選單 在vscode中開啟

2021-10-09 19:45:26 字數 1658 閱讀 5141

建立乙個文字檔案,寫入如下的文字

windows registry editor version 5.00

[hkey_classes_root\*\shell\vscode]

@="open with code"

"icon"

="c:\\program files (x86)\\microsoft vs code\\code.exe"

[hkey_classes_root\*\shell\vscode\command]

@="\"c:\\program files (x86)\\microsoft vs code\\code.exe\" \"%1\""

windows registry editor version 5.00

[hkey_classes_root\directory\shell\vscode]

@="open with code"

"icon"

="c:\\program files (x86)\\microsoft vs code\\code.exe"

[hkey_classes_root\directory\shell\vscode\command]

@="\"c:\\program files (x86)\\microsoft vs code\\code.exe\" \"%v\""

windows registry editor version 5.00

[hkey_classes_root\directory\background\shell\vscode]

@="open with code"

"icon"

="c:\\program files (x86)\\microsoft vs code\\code.exe"

[hkey_classes_root\directory\background\shell\vscode\command]

@="\"c:\\program files (x86)\\microsoft vs code\\code.exe\" \"%v\""

其中的vscode的路徑應該按照自己電腦的路徑進行修改。

路徑名最好用雙斜槓

將檔案字尾改為.reg,並以管理員身份開啟,如果右鍵選單沒有這個選項,可以管理員身份開啟cmd視窗,在cmd中執行上面的reg檔案(在cmd中進入上述reg檔案所在目錄,直接輸入檔名,回車即可)

win+r 輸入regedit開啟登錄檔選項

按照上述文字檔案中的路徑尋找

分別為

[hkey_classes_root\*\shell\vscode]

[hkey_classes_root\*\shell\vscode\command]

[hkey_classes_root\directory\shell\vscode]

[hkey_classes_root\directory\shell\vscode\command]

[hkey_classes_root\directory\background\shell\vscode]

[hkey_classes_root\directory\background\shell\vscode\command]

並輸入相應的引號中的資料即可

以上方法親測有效,無效可以來捶我

window 右鍵選單中新增在vs code 開啟

吃碼小妖 以前安裝vs code可以的,後面不知道為什麼不能右鍵在vs code中開啟了。於是,在網上搜尋到下面的方法。實驗效果 有效。結果如下 我最終想要的效果如上圖所示 右鍵資料夾,可以使用vscode開啟 右鍵單檔案,可以使用vscode開啟 右鍵空白處,可以使用vscode開啟 實現新建乙個...

Windows為VSCode新增右鍵選單

在本地建立乙個.reg字尾的檔案,檔名test 可自定義 建立好檔案後將其拖到任意一款編輯器當中,新增其內容 windows registry editor version 5.00 hkey classes root directory background shell vscode open v...

將VScode新增至右鍵選單

首先展示下最終效果 右擊單個檔案 右擊資料夾 操作流程 1.右擊vscode快捷方式檢視屬性,找到快捷方式對應的目標路徑 2.隨便找個地方新建個 reg的登錄檔指令碼檔案,檔案名叫啥都可以,但字尾名必須為.reg,然後在裡面貼上上下面的 windows registry editor version...