หลังอัปเดต Creators Update ตัวเลือก "Open command window here" หายไป เปลี่ยนเป็น "Open PowerShell window here" แทน สามารถเพิ่มคำสั่ง Command Prompt กลับมาได้ 2 วิธี
วิธีที่ 1: ใช้ไฟล์ Registry (.reg) - เร็วที่สุด
- เปิด Notepad คัดลอกโค้ดด้านล่างไปวาง:
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\""
- Save as: ประเภท All Files ชื่อ cmdfix.reg
- Double-click ไฟล์ > Yes > ตัวเลือก "Open command window here" จะกลับมา
เพื่อลบออก: สร้างไฟล์ Defaultcmd.reg เนื้อหา:
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]
วิธีที่ 2: แก้ Registry ด้วยตนเอง (คงคำสั่งเดิม "Open command window here")
- Win + R >
regedit - ไปที่:
HKEY_CLASSES_ROOT\Directory\shell\cmd - คลิกขวาโฟลเดอร์ cmd > Permissions > Advanced > Change Owner > ใส่ Username ของคุณ > Check Names > OK
- ติ๊ก Replace owner on subcontainers and objects > Apply/OK
- กลับ Permissions > เลือก Administrators > ให้ Full Control > Apply/OK
- ในโฟลเดอร์ cmd คลิกขวา DWORD HideBasedOnVelocityId > Rename เป็น ShowBasedOnVelocityId
- ปิด Regedit ตัวเลือกจะปรากฏทันที
วิธีลบ "Open PowerShell window here" ออกจาก Context Menu
- ไปที่:
HKEY_CLASSES_ROOT\Directory\shell\PowerShell - ทำขั้นตอน Permissions เหมือนข้างต้น (Take Ownership, Full Control)
- ในโฟลเดอร์ PowerShell คลิกขวา DWORD ShowBasedOnVelocityId > Rename เป็น HideBasedOnVelocityId
- ปิด Regedit
หมายเหตุ: ให้สร้าง Restore Point ก่อนแก้ Registry เสมอครับ