Windows Script Host ให้ความสามารถ scripting เหมือน batch files แต่มีฟีเจอร์มากกว่า ใช้ manual โดย user หรือสร้างโดย OS เพื่อ automate operations บนคอมพิวเตอร์ มี Script Errors หลายแบบ ปกติเป็นแบบนี้:
Script: <PATH of the VBS Script>
Line: x
Char: x
Error: The description of the error – The system cannot find the file specified
Code: xxxxxxxx
Source: Source of the error.

Windows Script Host error ตอน Windows 11/10 startup
ดู fixes ต่อไปนี้แก้ Windows Script Host errors บน Windows 11/10:
- ใช้ System File Checker
- Scan คอมพิวเตอร์หา malware
- ตั้งค่า default สำหรับ .vbs key
- Troubleshoot ใน Clean Boot State
- Repair Install Windows 11/10
1. ใช้ System File Checker
รัน CMD Admin execute คำสั่ง:
sfc /scannow
รีสตาร์ทระบบหลัง scan เสร็จ
ใช้ freeware FixWin รัน System File Checker คลิกเดียวได้
2. Scan คอมพิวเตอร์หา malware
เหตุผลหนึ่งที่เจอปัญหานี้คือ malware หากคอมพิวเตอร์ติด malware อาจเห็น Can not find script file message box Scan ด้วย antivirus software อาจใช้ second opinion malware scanner
แม้ส่วนใหญ่มี antivirus ติดตั้งแล้ว แต่อาจมีช่วงสงสัยอยาก second opinion แทนที่จะไป online antivirus scanners บางคนชอบ standalone on-demand antivirus scanner ติดตั้ง local ใช้ on-demand antivirus scanners นี้ได้
รัน scan ตอน Boot time หรือ Safe Mode เพื่อผลลัพธ์ดีที่สุด
3. ตั้งค่า default สำหรับ .vbs key
กด WIN+R เปิด Run พิมพ์ regedit Enter เปิด Registry Editor ไปที่ key:
Computer\HKEY_CLASSES_ROOT\.vbs

ดับเบิลคลิก (Default) string เปลี่ยน Value data เป็น VBSFile
4. Troubleshoot ใน Clean Boot State
Clean Boot ใช้ diagnose และ troubleshoot issues ระบบ เริ่มระบบด้วย drivers และ startup programs น้อยที่สุด แยกสาเหตุจาก software ที่ขัดจังหวะ Boot ใน Clean Boot State เช็คปัญหายังคงอยู่ไหม
- หากไม่เจอ แปลว่ามี third-party process ขัดจังหวะ Enable process ทีละอัน ดูว่าตัวไหนทำปัญหาเจอ offender
- หากปัญหาไม่หาย อาจต้อง Reset This PC
5. Repair Install Windows 11/10

ลอง Repair Install Windows copy ของคุณ ควรแก้ปัญหาได้ ใช้ installation media
หวังว่าช่วยได้!
ดู post นี้หาก Windows Script Host access ถูก disable บนเครื่อง
