Windows Script Host is an administration tool built into every Windows operating system. Its main function is the scripting abilities like batch files. The Windows Script Host error may appear on your Windows 10 computer due to virus invasion, registry errors, or VBS script files. This article on MiniTool mainly discusses how to fix Windows Script Host on Windows 10 and how to recover deleted files if needed.

What does Windows Script Host do?

Windows Script Host, short for WSH, is a Microsoft technology; it is designed for computer administrators to automate and manage some tasks for client computers (or servers). The scripting abilities which can be comparable to batch files are included in Windows Script Host. One of the most obvious characteristics is: it’s language-independent. That means the host can work with different Active Scripting language engines.

All in all, the Windows Script Host provides an environment for Windows users to execute scripts in different languages which will perform tasks via different object models.

Windows Script Host Error Windows 10

Windows Script Host Error

What is Windows Script Host error? It is an error that occurs now and then on PCs running all versions of Windows operating system. The Windows Script Host error is system related (it’s independent of any specific software) and often indicates the virus/malware infection, registry issue, or VBScript file problem.

Many people encounter this problem because the Windows Script Host tool has been damaged in their computers. The following content shares the causes and different situations of Windows Script Host issue.

What Causes Windows Script Host Errors

Three types of reasons are found to be responsible for Windows Script Host errors in Windows 7/8/10/11.

  • Virus or Malware: A virus or malware attack is proven to be the major cause of the Windows Script Host error. The virus/malware may attack your system and infect the crucial system files with malicious code. In this case, you must remove/eliminate the virus completely in time; otherwise, it may delete your valuable files/partitions, and even ruin your system.
  • VBS script file damage: the VBS script refers to the file that contains VBScript or Visual Basic Scripting codes. If the file goes wrong, it will cause several Windows Script Host errors.
  • Registry errors: this type of error usually shows up when you install new programs over the old programs directly. This will result in a slow speed in opening the programs and even a sudden crash in the system. To avoid this, you should uninstall the old ones completely before starting the installation of the new program.

[SOLVED] How To Recover Files Deleted By Virus Attack | Guide
[SOLVED] How To Recover Files Deleted By Virus Attack | Guide

I feel glad to share solutions with users to help them recover files deleted by virus attack quickly and safely.

Read More

Windows Script Host: Error Messages

The execution of the Windows Script Host failed sometimes and you may find yourself stuck in the following situations.

Situation 1: Windows Script Host Access Is Disabled on This Machine

You may encounter Windows Script Host access is disabled on this machine, Contact your administrator for details.

WSH access is disabled on this machine

Obviously, the error appears because you lose access to Windows Script Host on your current machine.

  • If you are using another person’s computer, you should ask the administrator for help, as suggested.
  • Yet, if you are running your own computer, you may try the methods that will be introduced in the next part to gain access again.

Situation 2: Windows Script Host Can Not Find Script File

Windows Script Host says Can not find script file “C:\Users\Public\Libraries\Checks.vbs” (the file location is not fixed). This “can not find script file” error occurs when the certain script file needed by the system currently has been damaged or lost. In theory, you could recover/repair the needed script file to fix the Windows Script Host cannot find script file issue.

WSH can not find script file

Learn Practical Ways To Recover Missing Files On Windows 10
Learn Practical Ways To Recover Missing Files On Windows 10

When you need to recover missing files on Windows 10, the methods mentioned in this article may become your life-saving straw.

Read More

Additionally, you may also receive the Can’t find script engine "VBScript" for script error message sometimes.

Situation 3: Windows Script Host The System Cannot Find the File Specified

You may also see a Windows Script Host window informing you that The system cannot find the file specified.

the system cannot find the file specified

Similarly, this error occurs when the system fails to find a certain script file (*.vbs).

In addition to access being denied, can not find the script file, and the system cannot find the file specified mentioned above, there are also other possible error messages indicating the Windows Script Host error:

How to Fix Windows Script Host on Windows 10

When your computer occurs a Windows Script Host error, you are supposed to find solutions. Here we compile several practical methods for you. But before this, we advise you to take good care of your data first.

Here we provide two options for you to manage your data. MiniTool ShadowMaker is a professional software to back up all important drives, systems, files, and folders on your computer.  It allows you to make differential and incremental backup schemes which can avoid duplicated backups. Besides, it contains a file sync function that can back up files to multiple locations simultaneously. You can find more functions about this software on this page. If you are looking for backup software, MiniTool ShadowMaker is a reliable one.

Free Download

How to Backup Files on Windows 10? Try These Top 4 Ways
How to Backup Files on Windows 10? Try These Top 4 Ways

How to keep data safe? How to back up files on windows 10? This post will introduce 4 ways to back up files with ease.

Read More

The other choice is MiniTool Power Data Recovery, a free data restore tool. It can recover lost data due to OS crashes, virus attacks, mistaken deletions, and so on. Even if you haven’t used any data recovery software before, you can easily master how to use this software because of its simple operation interface and clear introduction.

MiniTool Power Data Recovery provides comprehensive features to help you restore data. For saving your scan time, you can select specific scan locations like the desktop, Recycle Bin, and a selected folder. You can also set scan conditions like selecting file systems and file types before you start the scan process. Besides, you can recover files from external hard drives, USB flash drives, memory cards, and other data storage devices.

As a professional data recovery software, MiniTool Power Data Recovery causes no damage to your files. Why not have a try?

Free Download

Recover Data with MiniTool Power Data Recovery

Step 1: Click the button below to download MiniTool Power Data Recovery.

Free Download

Step 2: Initialize the setup program to finish the installation process of MiniTool Power Data Recovery. Then, run this data recovery software to see the main interface.

Step 3: Select a proper option from the top of the software’s main interface.

In the case where Windows Script Host goes wrong, you should:

  • Select Logical Drives to recover files from a certain drive.
  • Select Devices to recover files from a missing drive (you should also select this when you don’t know which drive the files are included in).

Step 4: Double-click on the target partition or the disk to perform a full scan on it. Then, wait for the scan result.

Step 5: Look through the files found by MiniTool Power Data Recovery and check the wanted files.

You can click the Preview button to check the selected files are what you want. Use Filter, Search, and Type functions to quickly locate your files.

function buttons

Step 6: Click on the Save button to choose another drive/disk to store the recovered files.

Step 7: Click on the OK button to confirm your choice.

MiniTool Power Data Recovery free edition can retrieve up to 1GB of files for free. You can get an advanced edition to enlarge the recovery capacity in this site.

Useful Ways to Fix Windows Script Host Error in Windows 10

Fix 1: Run the Microsoft Safety Scanner.

If your WSH issue is caused by malware or virus attacks, the Microsoft Safety Scanner tool is a good choice to fix your computer.

Step 1: Download the Microsoft Safety Scanner if you don’t have one.

Step 2: Install it properly on your PC.

Step 3: Disable all the antivirus software and security essentials.

Step 4: Run the Microsoft Safety Scanner to check your PC for viruses.

Step 5: Wait for the scan and do what it suggests you do.

Fix 2: Run System File Checker (SFC).

System File Checker is a useful tool to scan your Windows and fix corrupted files. When your computer can’t work as normal or encounters the error we discussed in this passage, you can try to run SFC.

Step 1: Press Win + R to open the Run window and input cmd.

Step 2: Press Ctrl + Shift + Enter at once to run Command Prompt as administrator.

Step 3: Choose Yes in the User Account Control pane.

Step 4: Type sfc /scannow and press Enter.

use SFC to scan

Step 5: Wait for the command to finish and close the window.

Step 6: Restart your computer.

Fix 3: Change the value of the .vbs key.

Step 1: Press Win + R to open the Run window.

Step 2: Type regedit and click on the OK button.

Step 3: Choose Yes in the User Account Control pane.

Step 4: Navigate Computer > HKEY_CLASSES_ROOT > .vbs.

Step 5: Right-click on the (Default) key in the right pane.

Step 6: Choose Modify… from the context menu.

Step 7: Change the Value data into VBSFile.

change the value data

Step 8: Click on the OK button to confirm.

Step 9: Close Registry Editor and reboot your PC to let changes take effect.

Fix 4: Delete entries after Userinit.exe

If you encounter a Windows Script Host error on startup, you can try this method to solve it.

How to Back up Individual Registry Keys Windows 10/11?
How to Back up Individual Registry Keys Windows 10/11?

Do you know how to back up individual Registry keys Windows 10? Now, this post will show you a step-by-step guidance to do this job.

Read More

Step 1: Press Win + R to open the Run window.

Step 2: Type regedit and press Enter to open Registry Editor.

Step 3: Navigate to Computer > HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > Winlogon.

Step 4: Delete any entries you find after the Userinit.exe. For example, VMApplet and WinStationsDisabled in the following interface.

delete entries after Userinit.exe

Step 5: Double-click on Userinit.exe and make sure the default value is C:\Windows\system32\userinit.exe.

Step 6: Close Registry Editor and reboot your PC to let changes take effect.

Please note that you can also try to delete the *.vbs entry when meeting Windows Script Host error on startup.

Fix 5: Run System Restore

You may find the Windows Script Host error occurs when you boot the computer or while you’re using it. Both situations mean the error is caused by recent computer use. If you have created system restore points before, you can restore your system to a previous state to solve this problem.

Step 1: Press Win + R to open the Run window.

Step 2: Input control and click Enter to open the Control Panel.

Step 3: Select Large icons under the View by tab to find the Recovery choice.

find Recovery choice

Step 4: Choose Open System Restore and select a restore point in the pop-up window.

choose Open System Restore

Fix 6: Rely on Repair Install.

If you have tried all the methods above but the issue still exists, this method should be your last resort. Windows reinstallation can reload the system files and registry keys, which will surely fix the Windows Script Host error and repair the corrupt system files.

For detailed operations about how to reinstall Windows 10, you can go to this article: How to Reinstall Windows 10 without CD/USB Easily (3 Skills)

How to Disable Windows Script Host in Win10

According to the report, some HTML malware will use WSH objects. Therefore, Windows users who don’t need this feature prefer to disable it. You can disable it with the next steps.

Step 1: Open the run dialog box the way you like.

Step 2: Type regedit and click on the OK button.

Step 3: Choose Yes in the User Account Control pane to open Registry Editor.

Step 4: Find the Enabled value under HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings.

Step 5: Double-click on Enabled from the right-hand pane.

Step 6: Set the Value data to 0 and click the OK button.

Please be advised that you won’t be able to run any scripts using WSH after disabling it (VBScript and JScript scripts are included).

How to enable the Windows Script Host again? Definitely, you should change the Value data of Enable key to 1. If you find Windows Script Host Enable key missing, please create a key by yourself.

Conclusion

Windows Script Host errors can occur occasionally, but they can be easily resolved. If you run into this error, please try the above methods to fix it. When you find data lost after the error is fixed, please try MiniTool Power Data Recovery to retrieve them.

Free Download

If you have any problem in using the software, please let us know via [email protected].

  • Linkedin
  • Reddit