Skip to content

How to fix Windows script host error?

  • by
  • 5 min read

For the most part, Windows is a rather stable OS with relatively few issues. However, a few major bugs and issues keep popping up from time to time.

In this article, we’re going over the Windows Script Host error, what it means, and what can you do to fix it?


What is the Windows Script Host error?

The error might seem like malware infection or virus at first, but more often than not, this error is triggered by an issue with the VBS script file. There are a couple of other possible reasons for this as well. 

  • Malware infection: While less likely, this error can be triggered by a malware or virus infection as well.
  • Registry errors: Corrupted or damaged regisry files can also trigger the error. 

Also read: Windows could not automatically detect this network’s proxy settings: 10 Fixes


How to fix the Windows script host error?

There are a couple of things you can do to get rid of this error. Try out the following solutions. 

Run an SFC scan

Corrupt files are the number one reason why your PC might be behaving weirdly. Here’s how you can get rid of them and potentially resolve your issue. 

Step 1: Press Windows Key + S to bring up the Cortana/Search box and search for Powershell. Open Windows Powershell from the search results.

Windows 10 start menu won't open: 6 fixes | Candid.Technology

Step 2: Type sfc /scannow to scan your system for issues. 

Windows 10 start menu won't open: 6 fixes | Candid.Technology

Step 3: If the SFC scan finds any problem, use the following command to resolve them. 

DISM /Online /Cleanup-Image /RestoreHealth
Windows 10 start menu won't open: 6 fixes | Candid.Technology

Restart your PC, and the Windows script host error should be gone.


Revert to the default VBS value

Resetting the VBS value can also get rid of the issue. Here’s how.

Step 1: Press Windows Key + R to open the Run prompt. Type regedit and hit enter.

Step 2: Navigate to the following directory.

HKEY_CLASSES_ROOT/.vbs
How to fix Windows script host error? | Candid.Technology

Step 3: Double-click the (Default) key and change its value to VBSfile.

How to fix Windows script host error? | Candid.Technology

Now restart your PC, and the Windows script host error should be fixed.

Also read: How to set an alarm for 10 minutes?


Delete Registry entries

By deleting Registry entries associated with the error and restarting your PC, you can force Windows to recreate the files in question, potentially resolving the issue. 

Step 1: Press Windows Key + R to open the Run prompt. Type regedit and hit enter.

How to fix Windows script host error? | Candid.Technology

Step 2: Navigate to the following directory.

HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon
How to fix Windows script host error? | Candid.Technology

Step 3: Delete all registry entries after userinit.exe 

How to fix Windows script host error? | Candid.Technology

Now restart your PC, and it should work fine. 


Delete the startup .vbs entry

Boot into Windows safe mode and try deleting the *.vbs entries that are used at startup. Here’s how. 

Step 1: Press the Windows key and search for Safe Mode. Click the corresponding search result.

How to fix 'System Thread Exception Not Handled' error in Windows 10?

Step 2: Under Advanced startup, click on Restart now. 

How to fix 'System Thread Exception Not Handled' error in Windows 10?

Step 3: When your PC reboots, click on Troubleshoot.

How to fix 'Can’t delete folder in Windows 10' issue?

Step 4: Head over to Advanced Options.

How to fix 'Can’t delete folder in Windows 10' issue?

Step 5: Select Startup Settings.

How to fix 'Can’t delete folder in Windows 10' issue?

Step 6: Click the Restart button.

How to fix 'Can’t delete folder in Windows 10' issue?

Step 7: Open the Registry editor and search for nameofthe.vbs. Once you’ve found a file, double-click it and carefully delete the VBS file path. Repeat this step until all instances of the path are deleted. 

Step 8: Open Windows Explorer, search for the VBS file and delete that file as well.

Now restart your PC, and you should be able to get around the Windows script host error.

Also read: How to change the primary monitor in Windows 10?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>