หากเจอ error An error is preventing this key from being opened ตอนเปิด registry keys ใน Registry Editor บน Windows 10 บทความนี้ช่วย

ขึ้นอยู่กับ registry key ที่พยายามเปิด จะได้ error เต็ม:
Key cannot be opened
An error is preventing this key from being opened.
Details: The system cannot find the file specified.
เจอ error นี้ถ้า search registry key/location/data ที่ชื่อยาวเกินไปที่ tool handle ไม่ได้ หรือ account ไม่มี permission เปิด/แก้/ลบ registry key เฉพาะ
An error is preventing this key from being opened
ถ้า error เพราะ search query ชื่อยาวเกินไป ลองแยก search query ถ้ามี Registry location ครบ เข้าถึง manual key โดย key
แต่ถ้าเพราะ account ไม่มี permission ต้องรัน regedit as SYSTEM account แทน administrator account (default)
ทำได้ด้วย command-line tool PsExec วิธี:
- Download PsExec tool by Sysinternals จาก TechNet
- Extract compressed zipped file
- ได้ folder PSTools Copy content ทั้งหมดไป:
C:\Windows\System32 folder
(แทนที่ C: ด้วย system root drive) - เปิด Command Prompt admin mode
- พิมพ์คำสั่ง Enter:
psexec -i -d -s c:\windows\regedit.exe
คำสั่งนี้จะเปิด Registry Editor ด้วย system account
ลอง search query อีกครั้ง
ควรสำเร็จโดยไม่มี issue
เสร็จแล้ว!
