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.

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

Step 3: If the SFC scan finds any problem, use the following command to resolve them.
DISM /Online /Cleanup-Image /RestoreHealth

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

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

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.

Step 2: Navigate to the following directory.
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon

Step 3: Delete all registry entries after userinit.exe

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.

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

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

Step 4: Head over to Advanced Options.

Step 5: Select Startup Settings.

Step 6: Click the Restart button.

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?