Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

วิธีรัน Batch File (.bat) เป็น Administrator อัตโนมัติ ไม่ต้องกด Allow ทุกครั้งใน Windows 10

Batch File (.bat) ใช้รันคำสั่งหลายคำสั่งพร้อมกัน บางคำสั่งต้องการ Admin Rights วิธีรันแบบครั้งเดียว: คลิกขวา > Run as Administrator

วิธีรัน Batch File (.bat) เป็น Administrator อัตโนมัติ ไม่ต้องกด Allow ทุกครั้งใน Windows 10

วิธีรัน Batch File (.bat) เป็น Administrator อัตโนมัติ ไม่ต้องกด Allow ทุกครั้งใน Windows 10

ตั้งค่าให้ Run as Administrator **ทุกครั้ง** (Auto-elevate)

  1. หาไฟล์ .bat
  2. คลิกขวา > Create Shortcut
  3. ตั้งชื่อ Shortcut ให้เหมาะสม
  4. คลิกขวา Shortcut > Properties
  5. แท็บ Shortcut > Advanced...
  6. ☑ Run as Administrator
  7. วิธีรัน Batch File (.bat) เป็น Administrator อัตโนมัติ ไม่ต้องกด Allow ทุกครั้งใน Windows 10
  8. OK > Apply > OK

✅ ตอนนี้ดับเบิลคลิก Shortcut นี้ จะรัน Batch File ด้วย Admin Rights อัตโนมัติ (ยังคงมี UAC Prompt 1 ครั้ง)

💡 หากต้องการรันโดยไม่มี UAC Prompt เลย ต้องใช้ Task Scheduler (Run with Highest Privileges) หรือปิด UAC (ไม่แนะนำ)