Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การแก้ไขปัญหา >> ข้อผิดพลาด Windows

แก้ไข: "Unable to execute file in the temporary directory" (Error 5) บน Windows 7, 8, 10

Error 5 – Access Denied ตอนรัน Setup File หมายถึงปัญหา Permission ของ User ข้อความ: Unable to execute files in the temporary directory ไม่สามารถดำเนินการติดตั้งต่อได้

เกิดเมื่อติดตั้งผ่าน .exe กด Dismiss ได้แค่ปิด Popup ไม่ได้ Continue Error พบมากใน Win 7 แต่版本อื่นก็เป็นได้

สัญญาณว่า Windows บล็อก Setup จากการตั้งค่า (Configuration Issue) ไม่ใช่ Error จริง มีหลายวิธีแก้:

วิธีที่ 1: Run as Administrator

Error Code บ่งชี้ปัญหา Permission วิธีนี้ Bypass ได้

  1. หาไฟล์ .exe ที่ต้องการติดตั้ง
  2. แทน Double-click ให้ Right-click > Run as administrator หากมี UAC คลิก Yes

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

เป็น Workaround ชั่วคราว หาไม่ว่างทำวิธีอื่น

วิธีที่ 2: สร้าง Temp Folder ใหม่ และเปลี่ยน Environment Variables

Error บอกปัญหา Temporary Directory สร้างใหม่และเปลี่ยน Variable

  1. ใน Drive C: สร้างโฟลเดอร์ใหม่ชื่อ Temp (เปลี่ยน C: เป็น Drive ที่ติดตั้ง OS)

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

  1. คลิกขวา This PC / My Computer > Properties

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

  1. ซ้ายคลิก Advanced System Settings
  2. แท็บ Advanced > Environment Variables

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

  1. ใน User variables คลิก TMP ค่าเดิม %USERPROFILE%\AppData\Local\Temp เปลี่ยนเป็น C:\Temp > OK ปิดหน้าต่างทั้งหมด

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

  1. ลองติดตั้งโปรแกรมใหม่ ควรทำงานได้

วิธีที่ 3: ให้ Full Control บน Temp Folder เดิม

  1. ไป User Folder ใน Drive OS > AppData > Local (Path: C:\Users\User\AppData\Local)
  2. หาโฟลเดอร์ Temp คลิกขวา > Properties
  3. แท็บ Security > คลิก Everyone > Edit (หาไม่เจอ Everyone ดู GIF เพิ่ม)

แก้ไข:  Unable to execute file in the temporary directory  (Error 5) บน Windows 7, 8, 10

  1. ติ๊ก Full Control > OK

ให้ Full Control แก้ Permission Issue

วิธีที่ 4: ตรวจสอบ Inheritable Permissions บน Temp Folder

  1. เปิด Security Tab ของ Temp Folder (ขั้น 1-3 วิธี 3)
  2. คลิก Advanced ดู Permissions ควรมี SYSTEM, Administrators, User ทั้งหมด Full Control และ Inherited from C:\Users\User
  3. หา Include inheritable permissions from this object's parent ให้ติ๊กถูก > Continue > Apply > OK

ตอนนี้ควรมี Permission เขียนได้ แก้ Error 5 แล้ว

Windows Permissions ซับซ้อนสำหรับมือใหม่ ตั้งถูกต้อง ป้องกันความเสียหายระบบ ตั้งผิด บล็อกงานที่จำเป็น ทำตามวิธีข้างต้น จะแก้ Error 5 – Access Denied ได้ ติดตั้งโปรแกรมต่อไปไม่ต้องกังวล