Windows Script Host provides scripting abilities like batch files but includes many more features. It can be used manually by a user as well as created by the operating system to automate the flow of operations on a computer. There are many Script Errors that can take place with this process. They are usually as follows:
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 on Windows 11/10 startup
We will be taking a look at the following fixes to get rid of the Windows Script Host errors on Windows 11/10-
- Use System File Checker.
- Scan computer for malware.
- Set the default value for the .vbs key.
- Troubleshoot in Clean Boot State
- Repair Install Windows 11/10.
1] Use System File Checker
Run CMD as Administrator and then execute the following command to run System File Checker:
sfc /scannow
Restart your system after the scan is completed.
You can also use our freeware FixWin to Run the System File Checker utility with a click.
2] Scan computer for malware
One of the reasons why people get this issue is because of malware. If your computer is infected by malware, you may see a Can not find script file message box appear. Scan your computer with your antivirus software. You may also use a second opinion malware scanner.
Even though most of us may have antivirus software installed on our Windows computer, there may be times of doubt, where you might want a second opinion. While one can always visit online antivirus scanners from well-known security software to scan one’s PC, some prefer to have a standalone on-demand antivirus scanner installed locally. At such times you may use these on-demand antivirus scanners.
Run the scan at Boot time or in Safe Mode for best results.
3] Set the default value for the .vbs key
Hit the WIN+R button combination to launch the Run utility, type in regedit and hit Enter. Once Registry Editor opens, navigate to the following key-
Computer\HKEY_CLASSES_ROOT\.vbs
Double-click on the (Default) string and change its Value data to VBSFile.
4] Troubleshoot in Clean Boot State
A Clean Boot is used to diagnose and later troubleshoot issues with your system. During a Clean Boot, we start the system with a minimal number of drivers and startup programs which helps isolate the cause with interfering software. Once you have booted in the Clean Boot State, check if the problem persists.
- If it does not then there is some third-party process interfering with its proper functioning. Enable one process after another and see which process makes the problem appear. Thus you can find the offender.
- If the problem does not disappear, then you may need to use the Reset This PC option.
5] Repair Install Windows 11/10
You can also try to Repair Install your copy of Windows and that should be a good candidate to resolve your issues. Use installation media to do this.
Hope this helps!
See this post if Windows Script Host access is disabled on your machine.
Cannot run VBScript; How to run VBScript in Windows 11/10?
- Right-click the VBS file that you cannot run
- Select Properties
- Click the Change button
- Select Microsoft Windows Based Script Host to restore the association.
- In case you cannot find Microsoft Windows Based Script Host, open the Windows > System32 folder
- Double-click on wscript.exe to finish the process.
You will now be able to run VBS files from there by double-clicking the item.
Is Windows Script Host a virus?
Windows Script Host is an error with the VBScript file and not malware. Nevertheless, if you have doubts, it is always a good idea to scan your computer with your antivirus software at boot time as viruses can misuse this function to launch malicious code.