Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows

Thêm mục mở Windows Terminal theo hồ sơ Default, Command Prompt, PowerShell vào Menu ngữ cảnh

Windows Terminal cho phép mở nhiều tab Command Prompt, Windows PowerShell, v.v., trong một cửa sổ, và bạn có thể mở nó từ menu ngữ cảnh chuột phải. Tuy nhiên, vì tùy chọn mặc định mở hồ sơ khởi động mặc định, bạn có thể thêm menu ngữ cảnh dạng cascade (mở rộng) để mở bất kỳ hồ sơ nào theo yêu cầu.

Thêm mục mở Windows Terminal trong Default, Command Prompt, PowerShell profile vào Menu ngữ cảnh

Thêm mục mở Windows Terminal theo hồ sơ Default, Command Prompt, PowerShell vào Menu ngữ cảnh

Giả sử hồ sơ khởi động mặc định của bạn là Command Prompt, nhưng bạn muốn mở Windows PowerShell. Lúc đó, bạn có thể dùng tùy chọn menu ngữ cảnh để mở Windows PowerShell trong ứng dụng Windows Terminal mà không cần quyền quản trị. Có thể làm được bằng Registry Editor. Do đó, khuyên nên tạo điểm khôi phục hệ thống trước khi làm.

Thêm menu ngữ cảnh Windows Terminal mở rộng để mở bất kỳ hồ sơ nào

Để thêm menu ngữ cảnh Windows Terminal mở rộng, làm theo các bước:

  1. Mở Notepad trên máy.
  2. Dán văn bản sau.
  3. Nhấn File > Lưu với tên.
  4. Chọn vị trí, nhập tên với phần mở rộng .reg, chọn Tất cả các tệp từ danh sách Loại lưu.
  5. Nhấn nút Lưu.
  6. Chuột phải kép vào tệp .reg và xác nhận thêm.
  7. Chuột phải vào Desktop để tìm các tùy chọn.

Để tìm hiểu thêm về các bước trên, tiếp tục đọc.

Đầu tiên, mở Notepad và dán văn bản sau:

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\OpenWTHere] "MUIVerb"="Open in Windows Terminal" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\001flyout] "MUIVerb"="Open in Windows Terminal Default Profile" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\001flyout\command] @="cmd.exe /c start wt.exe -d \"%1\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\002flyout] "MUIVerb"="Open in Windows Terminal Command Prompt" "Icon"="imageres.dll,-5323" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\002flyout\command] @="cmd.exe /c start wt.exe -p \"Command Prompt\" -d \"%1\"" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\003flyout] "MUIVerb"="Open in Windows Terminal PowerShell" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Shell\OpenWTHere\shell\003flyout\command] @="cmd.exe /c start wt.exe -p \"Windows PowerShell\" -d \"%1\"" [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHere] "MUIVerb"="Open in Windows Terminal" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\001flyout] "MUIVerb"="Open in Windows Terminal Default Profile" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\001flyout\command] @="cmd.exe /c start wt.exe -d \"%V\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\002flyout] "MUIVerb"="Open in Windows Terminal Command Prompt" "Icon"="imageres.dll,-5323" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\002flyout\command] @="cmd.exe /c start wt.exe -p \"Command Prompt\" -d \"%V\"" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\003flyout] "MUIVerb"="Open in Windows Terminal PowerShell" "Icon"="powershell.exe" [HKEY_CLASSES_ROOT\Directory\Background\Shell\OpenWTHere\shell\003flyout\command] @="cmd.exe /c start wt.exe -p \"Windows PowerShell\" -d \"%V\""

Nhấn File > Lưu với tên tùy chọn và chọn vị trí lưu tệp.

Thêm mục mở Windows Terminal theo hồ sơ Default, Command Prompt, PowerShell vào Menu ngữ cảnh

Nhập tên với phần mở rộng .reg (ví dụ: TermExpMenu.reg), chọn Tất cả các tệp từ danh sách thả xuống Loại lưu , và nhấn nút Lưu .

Sau đó, chuột phải kép vào tệp .reg vừa tạo và nhấn nút Yes .

Nếu muốn, bạn có thể tải tệp Registry sẵn sàng của chúng tôi để thêm mục menu ngữ cảnh này.

Bây giờ bạn có thể chuột phải vào desktop để tìm tùy chọn Windows Terminal mở rộng trong menu ngữ cảnh để trực tiếp mở bất kỳ hồ sơ nào.

Tuy nhiên, nếu bạn không còn cần tùy chọn menu ngữ cảnh này và muốn xóa, làm theo các bước sau.

Đầu tiên, làm theo hướng dẫn mở Registry Editor trên máy và điều hướng đến các đường dẫn này lần lượt:

HKEY_CLASSES_ROOT\Directory\shell\OpenWTHere HKEY_CLASSES_ROOT\Directory\Background\shell\OpenWTHere

Chuột phải vào khóa OpenWTHere và chọn Xóa tùy chọn.

Thêm mục mở Windows Terminal theo hồ sơ Default, Command Prompt, PowerShell vào Menu ngữ cảnh

Sau đó, xác nhận xóa bằng cách nhấn nút OK .

Sau đó, bạn có thể phải khởi động lại máy hoặc đăng xuất và đăng nhập lại tài khoản để thay đổi có hiệu lực.

Tiếp theo, chúng ta sẽ xem cách thêm Mở Windows Terminal với quyền quản trị vào Menu ngữ cảnh.

Đó là tất cả! Hy vọng hướng dẫn này giúp bạn thêm tùy chọn Windows Terminal mở rộng vào menu ngữ cảnh để mở bất kỳ hồ sơ nào bạn muốn.

Đọc thêm liên quan:

  • Xóa Mở trong Windows Terminal khỏi Menu ngữ cảnh
  • Cách thay đổi Shell mặc định trong Windows Terminal.

Thêm mục mở Windows Terminal theo hồ sơ Default, Command Prompt, PowerShell vào Menu ngữ cảnh