Computer >> Hướng Dẫn Máy Tính >  >> Xử Lý Sự Cố >> Lỗi Windows

Khôi phục tùy chọn Command Prompt cổ điển trong Menu chuột phải Windows 10

Sau khi cập nhật Windows 10 Creators Update, nhiều người nhận thấy khi nhấn Shift + chuột phải vào thư mục, tùy chọn "Open command window here" đã bị thay bằng "Open PowerShell window here". Nhiều người không biết PowerShell là gì, Microsoft kỳ vọng họ dùng tính năng này như thế nào? Bài viết này hướng dẫn thêm lại tùy chọn "Open command window here" vào menu ngữ cảnh File Explorer.

Cũng có tùy chọn Command Prompt trong Start Menu bị thay bằng PowerShell, nhưng có thể khôi phục qua Windows Settings. Tuy nhiên, không có cài đặt nào để thay thế tùy chọn "open command window here" trong menu chuột phải. Dưới đây là cách khắc phục.

Thay PowerShell bằng Command Prompt trong Context Menu Windows 10

Tạo điểm khôi phục hệ thống trước khi thực hiện.

Cách 1: Sử dụng file Registry Fix

Lưu ý: Nếu không muốn dùng cách này, hãy thử cách 2 (chỉnh Registry thủ công).

  1. Mở Notepad rỗng, dán nội dung sau:
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\Directory\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "Extended"=""
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "Extended"=""
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
    [HKEY_CLASSES_ROOT\Drive\shell\cmdprompt]
    @="@shell32.dll,-8506"
    "Extended"=""
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\Drive\shell\cmdprompt\command]
    @="cmd.exe /s /k pushd \"%V\""
  2. File > Save as.
  3. Save as type chọn All Files.
  4. Đặt tên file: cmdfix.reg (phần mở rộng .reg rất quan trọng).
  5. Chọn vị trí lưu > Save.
  6. Double-click file > Yes để thêm tùy chọn "Open command window here" vào menu ngữ cảnh.
  7. Nếu muốn xóa tùy chọn này, tạo file Notepad mới với nội dung:
    Windows Registry Editor Version 5.00
    [-HKEY_CLASSES_ROOT\Directory\shell\cmd2]
    [-HKEY_CLASSES_ROOT\Directory\Background\shell\cmd2]
    [-HKEY_CLASSES_ROOT\Drive\shell\cmd2]
    [-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\cmd2]
  8. Save as type All Files, tên file Defaultcmd.reg.
  9. Save > Double-click để xóa tùy chọn khỏi menu ngữ cảnh.

Cách 2: Tạo thủ công các entry Registry

  1. Nhấn Windows Key + R, gõ regedit > Enter.
  2. Điều hướng đến: HKEY_CLASSES_ROOT\Directory\shell\cmd
  3. Chuột phải thư mục cmd > Permissions.
  4. Tab Security > nút Advanced.
  5. Nhấp Change bên cạnh Owner.
  6. Cửa sổ Select User or Group > Advanced > Find Now > chọn tài khoản của bạn > OK.
  7. Tích "Replace owner on subcontainers and objects" > Apply > OK.
  8. Quay lại Permissions > chọn Administrators > tích Full Control > Apply > OK.
  9. Trong thư mục cmd, chuột phải DWORD HideBasedOnVelocityId > Rename.
  10. Đổi tên thành ShowBasedOnVelocityId > Enter.
  11. Tùy chọn "Open command window here" sẽ bật ngay khi đóng Registry Editor.
  12. Để hoàn tác, đổi lại thành HideBasedOnVelocityId.

Cách xóa "Open PowerShell window here" khỏi menu ngữ cảnh

Dù đã làm trên, tùy chọn PowerShell vẫn còn. Để xóa nó:

  1. Mở regedit (Windows Key + R > regedit).
  2. Điều hướng: HKEY_CLASSES_ROOT\Directory\shell\PowerShell
  3. Chuột phải PowerShell > Permissions.
  4. Advanced > Change next to Owner > Advanced > Find Now > chọn tài khoản của bạn > OK.
  5. Tích "Replace owner on subcontainers and objects" > Apply > OK.
  6. Chọn Administrators > Full Control > Apply > OK.
  7. Trong thư mục PowerShell, chuột phải DWORD ShowBasedOnVelocityId > Rename.
  8. Đổi thành HideBasedOnVelocityId > Enter.
  9. Tùy chọn "Open PowerShell window here" sẽ bị ẩn ngay lập tức.
  10. Để hoàn tác, đổi lại thành ShowBasedOnVelocityId.

Bài viết liên quan:

  • Cách di chuyển App Windows 10 sang ổ khác
  • Cách mở rộng phân vùng ổ C: trên Windows 10
  • Thay PowerShell bằng Command Prompt trong Start Menu Windows 10
  • Cách thay đổi thư mục cài đặt mặc định trên Windows 10

Bạn đã thành công thay PowerShell bằng Command Prompt trong Context Menu Windows 10. Còn thắc mắc hãy bình luận bên dưới.