Windows host script error can be encountered at any time, no matter which version of the operating system you are using. If this error occurs unexpectedly, it indicates that a module is not working properly and needs to be corrected accordingly.
However, users often do not understand what message is contained in the error itself. The confusion occurs because the Windows Script Host crash is independent of the software installed on the device. Rather, it is a string in a script that is part of the operating system itself.
However, the causes of this problem can vary, but most often it indicates a malware infection. Therefore, as the very first step in an attempt to remedy the situation, you should perform a full system scan using reliable antivirus software. In addition, the problem can be caused by damaged system files, errors in the registry, or something else. Therefore, below you will find several solutions for different situations.
Solution 1. Scan your computer for malware
While there are many third-party system protection applications on the market, Windows includes a free antivirus called Windows Defender. This software is currently on par with many well-known security software vendors. Therefore, if there is no third-party antivirus on your computer, use it. The first step is to find out if the problem lies in the presence of malware on the PC.
Scan your computer:
- Right-click on Start and select Settings.
- Go to update and security.
- Select Windows Security on the left and click Virus & threat protection.
- Then click on Scan Options;
- Click the Windows Defender Offline Check and Scan Now checkbox.
This action will restart your computer and start a deep system scan.
Solution 2. Run SFC and DISM scan
System File Checker can diagnose and repair problematic or corrupted Windows system data:
- Enter cmd in Windows search.
- Right click on Command Prompt and select Run as administrator.
- In the new window, type sfc / scannow and press Enter. Perform an SFC scan.
- Wait until the program completes and restart your computer.
If the SFC scan finds nothing or fails to fix the detected integrity violations, you should perform a Windows image repair using DISM. Open Command Prompt as administrator again and run the following commands, pressing Enter after each one:
- Dism / Online / Cleanup-Image / CheckHealth;
- Dism / Online / Cleanup-Image / ScanHealth;
- Dism / Online / Cleanup-Image / RestoreHealth.
Solution 3. Restore the default VBS value via the registry
Incorrectly modifying the Windows registry can lead to errors, damage to system files and OS. Make sure to back up your database before proceeding to the next steps.
- Type regedit in Windows search and press Enter.
- Go to the registry. If User Account Control displays, click Yes.
- In the registry window that opens, click on the Edit line, and then – Find and enter Vbs – you need to find the folder of the same name.
- Double-click the default key on the right.
- Make sure the key is set to VBSFile and click OK.
- Restore the default VBS value.
Solution 4. Disable Windows Script Host via registry
Windows Script Host was introduced in Windows 98 – it allows you to run more programming languages on your computer. Unfortunately, if malware manages to infiltrate the device, it can abuse it and gain access to more internal functions. Thus, completely disabling the Windows Script Host when not in use is a good security practice that will also stop the related error from appearing.
- Type regedit in Windows search and press Enter.
- After entering the registry editor, go to the following path: HKEY_CURRENT_USER Software Microsoft Windows Script Host Settings .
- If you don’t see the Enabled key on the right, create it.
- To do this, right-click an empty space in the right window and select New> DWORD (32-bit) Value.
- After the key appears, double-click on it with LMB and set its value to 0 Disable Windows Script host.
- Now go to the next path and repeat the steps above: HKEY_LOCAL_MACHINE Software Microsoft Windows Script Host Settings .
Note. Each time you try to run the VBS file, you will receive an error message: “Windows host script access is disabled on this computer.” You can re-enable it by changing the key value in the mentioned registry keys to 1.