แก้ไข Windows Script Host Errors ตอน Startup Windows 10: สาเหตุหลักคือ ไวรัสหรือมัลแวร์ ติดไฟล์ .vbs script แต่แก้ไขได้ง่ายตามขั้นตอนด้านล่าง
Windows Script Host Script: C:\users\u510\desktop\Operators-Expressions-demos\Operators-Expressions-demos\scripts\js-console.js line: 1 char: 1 error: Object expected code: 800A138F source: microsoft JScript runtime error
วิธีแก้ไข Windows Script Host Errors
แนะนำ: สร้าง Restore Point ก่อนเริ่ม
วิธีที่ 1: รัน SFC และ CHKDSK
- Windows Key + X > Command Prompt (Admin)
- รันคำสั่ง:
Sfc /scannow sfc /scannow /offbootdir=c:\ /offwindir=c:\windows
- รอ SFC เสร็จ > รีสตาร์ท
วิธีที่ 2: รัน Microsoft Safety Scanner
ดูเหมือนติดไวรัส แนะนำรัน Microsoft Safety Scanner (ปิด Antivirus อื่นๆ ระหว่างรัน)
วิธีที่ 3: Clean Boot
- Windows Key + R > msconfig Enter
- แท็บ General > Selective Startup > ยกเลิกติ๊ก Load startup items
- แท็บ Services > ติ๊ก Hide all Microsoft services
- คลิก Disable all
- รีสตาร์ท ตรวจสอบ
- หลังเสร็จ เรียกคืนการตั้งค่าเดิม (Normal Startup)
วิธีที่ 4: ตั้งค่า Default Value ของ .vbs Key
- Windows Key + R > regedit Enter
- ไปที่:
Computer\HKEY_CLASSES_ROOT\.vbs
- แปนขวา Double-click Default
- เปลี่ยน Value เป็น VBSFile > OK
- รีบูท
วิธีที่ 5: ลบ VMapplet และ WinStationsDisabled จาก Registry
- เปิด Registry Editor (regedit)
- ไปที่:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- แปนขวา ลบ Entry ทั้งหมดหลัง userinit (รวม VMApplet และ WinStationsDisabled)
- ⚠ คำเตือน: ห้ามพิมพ์ userinit path ผิด ไม่อาจล็อกตัวเองนอกระบบได้ ใช้ได้ก็ต่อเมื่อ Windows ติดตั้งบน C: Drive
- Double-click userinit > ลบ entry 'C:\windows\system32\servieca.vbs' หรือ 'C:\WINDOWS\run.vbs' ให้ค่า Default เป็น 'C:\Windows\system32\userinit.exe,' (มีคอมม่าท้าย) > OK
- ปิด Registry Editor > รีสตาร์ท
วิธีที่ 6: Repair Install (ทางเลือกสุดท้าย)
In-place Upgrade ซ่อมระบบไม่ลบข้อมูล อ่าน: How to Repair Install Windows 10 Easily
เสร็จสิ้น! แก้ไข Windows Script Host Startup Errors เรียบร้อย สอบถามได้ในความคิดเห็น