Microsoft windows based script host ошибка

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.

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

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:

  • Not enough storage
  • Not enough memory
  • Blocked by group policy
  • The parameter is incorrect
  • Etc.

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.

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

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?

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

Recover Data with MiniTool Power Data Recovery

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

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

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.

Tips:

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.

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.

Tips:

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.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

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

С ошибками сценария в ОС семейства Windows можно встретиться вне зависимости от версии операционной системы. Все они приносят значительные неудобства пользователю, так как программа, при которой появилась ошибка, прекращает работать. При каких условиях возникает ошибка windows script host, как исправить, чтобы она не повторялась впредь, рассказываю ниже. Нужно выполнить ряд простых действий.

Фото 2

Содержание статьи

  1. «Windows Script Host» – что это за ошибка?
  2. Как решить проблему
  3. Настройка времени
  4. Отключение обновлений
  5. Удаление некорректно установленных обновлений
  6. Установка лицензионной Windows
  7. Ошибки файловой системы
  8. Установить значение по умолчанию для ключа .vbs
  9. Проверка компьютера на наличие вредоносных программ
  10. Отключите Windows Script Host через реестр
  11. Как действовать, если рабочий стол не запускается?
  12. Что делать, чтобы такие ошибки более не появлялись?
  13. Комментарии пользователей

Нужно иметь в виду, что этот сбой не зависит от имеющегося в операционной системе программного обеспечения, а, скорее, относится к ошибке сценария самой системы. Поэтому ошибкой многих пользователей считается сбор информации и анализ работы внешних программ, а также их перенастройка в надежде устранить сбой.

Как решить проблему

Основными причинами возникновения ошибки скрипта Windows являются следующие:

  • действие вирусов;
  • ошибка времени;
  • ошибка обновлений ОС;
  • пиратская версия системы;
  • сбой работы системных файлов.

Действие вредоносного ПО необходимо иметь в виду. Чаще всего именно вирусы являются причиной ошибки сценария Windows. Поэтому первым шагом будет проверка системы на вирусы одним из эффективных антивирусных программ с обновленными базами. Важно проверить не только системный раздел, но и всю информацию, и логические структуры, имеющиеся в системе.

Настройка времени

Часто ошибка script host в Windows вызывает простое несовпадение временных параметров. В этом случае следует обратить внимание на строку времени: некорректными может быть как само время, так и дата.

Внимание! Настройку даты и времени нужно делать от пользователя с полными правами.

Эти параметры нужно проверить. Для настройки времени и даты следует выполнить такие действия:

  1. Открыть через кнопку «Пуск» «Панель управления»-«Часы и регион»;

Фото 3

  1. В разделе «Дата и время» кликнуть на подменю «Установка даты и времени»;

Фото 4

  1. Откроется окно с указанием даты, времени и часового пояса, где нужно нажать на кнопку «Изменить дату и время»;

Фото 5

  1. В открывшемся окне откорректировать требуемые параметры и нажать на кнопку ОК.

Перезагружать компьютер нет необходимости. Дата и время установится сразу после применения настроек. Эти параметры можно настроить в BIOS в главном окне.

Отключение обновлений

Включенная функция загрузки и установки обновлений в редких случаях, но приводит к возникновению ошибки скрипта. Когда не помогла настройка времени, автоматические обновления лучше на время отключить. В Windows 10 сделать это можно через Редактор локальной групповой политике:

  1. Сочетанием клавиш Win+R открыть функцию «Выполнить»;
  2. Ввести команду gpedit.msc;

Фото 6

  1. Откроется окно реестра, где переходим по ветке «Конфигурация компьютера\Административные шаблоны\Компоненты Windows\Центр обновления Windows»;

Фото 7

  1. Двойным щелчком мыши открыть настройки пункта Настройка автоматического обновления и в соответствующей области поставить флажок на «Отключено».

Фото 8

Для применения настроек нужно нажать кнопку ОК. После закрытия всех окон с применением настроек рекомендуется перезагрузить компьютер. После этого обновления не должны загружаться в систему.

Удаление некорректно установленных обновлений

Бывает так, что обновления с ошибками выпускает сама компания Microsoft – разработчик операционной системы Windows. Это приводит к массовым сбоям операционных систем Windows, которые получили обновление со сбоем.

Фото 9

Важно! Удалять обновления нужно лишь в том случаи, если вы уверены, что ошибку вызывает именно конкретный апдейт.

Пользователь волен подождать некоторое время, чтобы было выпущено обновление, устраняющее ошибку, однако просто удалить файлы намного проще и безопаснее для системы. Удалить установленное обновление можно через Панель управления следующим образом:

  1. В Панели управления открыть пункт «Программы»-«Удаление программы»;

Фото 10

  1. Откроется окно, где в левом меню следует выбрать пункт «Просмотр установленных обновлений»;

Фото 11

  1. Для удаления обновления необходимо кликнуть по нему правой кнопкой мыши и нажать пункт «Удалить».

Фото 12

Для более достоверного удаления важных обновлений рекомендуется отсортировать их по дате и удалить именно тот апдейт, после установки, которого начались ошибки сценария. После окончания процесса удаления нужно перезагрузить компьютер.

Установка лицензионной Windows

Фото 13Причиной описываемого сбоя часто является встроенный или внешний взломщик лицензии. Дело в том, что такое ПО изменяет код системы и вносит в него свои правки. Из-за этого могут некорректно работать множество сценариев, что и приводит к возникновению ошибки.

Поэтому очень важно устанавливать и пользоваться только лицензионной Windows любой версии. Приобрести ее можно непосредственно у Microsoft, скачав на официальном сайте или купить у официального дистрибьютора. Это безопасно и практично, так как пользователь лицензионной ОС всегда своевременно получает все обновления системы и поддержку производителя.

Ошибки файловой системы

Проверить файловую систему на наличие ошибок можно, введя в командной строке «sfc /scannow».

Фото 14

Это инициирует процесс сканирования SFC. По возможности найденные ошибки будут исправлены. Если таковые найдены не были, можно восстановить целостность системы. Для этого предусмотрены определенные команды. Вводить их нужно поочередно, после каждой нажимать кнопку Enter:

  1. Dism/Online/Cleanup-Image/CheckHealth;
  2. Dism/Online/Cleanup-Image/ScanHealth;
  3. Dism/Online/Cleanup-Image/RestoreHealth.

После окончания всех процессов рекомендуется перезагрузить компьютер через кнопку «Пуск». Далее, когда система окончательно загрузится, ошибок сценария больше быть не должно.

Установить значение по умолчанию для ключа .vbs

Еще одной распространенной причиной ошибки сценария Windows Script Host является сбой параметров ключа .vbs. Его параметры по умолчанию восстанавливают через реестр. Для этого выполняют следующие действия:

  1. Открыть сочетанием клавиш Win+R функцию «Выполнить» и ввести команду regedit;

Фото 15

  1. Откроется окно реестра, где нужно перейти по цепочке HKEY_CLASSES_ROOT\.vbs;
  2. В левой части кона будет расположена папка .vbs, на которую нужно нажать левой клавишей мыши;

Фото 16

  1. В правой части окна появится значок «По умолчанию», на который нужно нажать двойным щелчком мыши и в поле Значение прописать VBSFile.

Для утверждения параметров нажать на кнопку ОК и закрыть все окна. Далее рекомендуется перезагрузить компьютер и убедиться в отсутствии ошибки.

Проверка компьютера на наличие вредоносных программ

Процедуру проверки на вирусы рекомендуется проводить как минимум раз в полгода. При этом, следует использовать актуальную версию антивирусной программы с обновленными базами. На современном рынке программных продуктов существует много эффективных антивирусов.

Например, с официального сайта можно скачать Kaspersky – признанный во всем мире один из лучших антивирусов. Существуют версии для дома и бизнеса с разным набором функций и дополнительных защит. Проверка состоит из следующих шагов:

  1. Запустить главное меню программы (с ярлыка или на панели задач);

Фото 17

  1. Выбрать пункт «Проверка»;

Фото 18

  1. Рекомендуется выбрать «Полная проверка» и нажать на кнопку «Запустить проверку».

Фото 19

Дождаться окончания проверки с выводом результатов. Обнаруженные угрозы можно удалять или попытаться вылечить на усмотрение пользователя и с учетом важности зараженных файлов.

Также можно воспользоваться антивирусной программой «Avast». Скачать бесплатную версию программы можно, перейдя на официальный сайт разработчика.

Отключите Windows Script Host через реестр

Отключение скриптов в системе повышает безопасность ОС, однако запрещает работу пакетных файлов bat или cmd. Для домашних нужд это вполне эффективный вариант устранения ошибки сценариев, если предыдущие способы не дали желаемый результат. Для отключения Script Host через реестр нужно выполнить такие действия:

  1. Открыть окно реестра по команде regedit;
  2. Пройти по цепочке HKLM\Software\Microsoft\Windows Script Host\Settings;
  3. В правой части окна найти параметр Enable и открыть его двойным щелчком мыши;

Фото 20

  1. Установить значение 0.

Чтобы включить параметр заново, нужно поставить значение 1. Для этого в параметрах по веткам:

  1. HKEY_CLASSES_ROOT\batfile\shell\open\command
  2. HKEY_CLASSES_ROOT\cmdfile\shell\open\command

Фото 21

Фото 22

Меняем стоковые параметры на NOTEPAD.EXE %1.

Как действовать, если рабочий стол не запускается?

Если при включении ПК рабочий стол не запустился, ничего страшного. Есть способ это исправить. Требуется последовательно выполнить несколько действий:

  1. Одновременно нажать клавиши «Ctrl», «Alt» и «Del».
  2. Выбрать пункт «Запустить диспетчер задач».
  3. Перейти во вкладку «Файл».
  4. Кликнуть по «Новая задача (Выполнить…)».

Фото 22

  1. В интерактивном поле ввести запрос «explorer.exe» и нажать «ОК».

Фото 23

После этого рабочий стол станет доступен и можно будет приступить к решению проблемы одним из способ, указанных выше.

Что делать, чтобы такие ошибки более не появлялись?

Несколько рекомендаций, способных помочь избежать ошибки «Windows Script Host» в будущем:

  • Антивирусная программа, установленная на компьютере, должна содержать все актуальные пакеты данных. Это значит, что нельзя препятствовать ее регулярным обновлениям.
  • За ПК следует работать от имени пользователя, а не администратора – так безопаснее.
  • Следует оказаться от посещения сомнительных интернет-ресурсов и загрузки файлов из потенциально ненадежных источников.

Совет: чтобы избежать неприятностей и проблем, следует проводить проверку компьютера на наличие вирусных программ хотя бы раз в месяц.

Ошибка сценария в Windows – проблема не установленных программ, а самой операционной системы. Поэтому решать ее нужно в большинстве случаев с помощью различных манипуляций с ОС. Для этого необходимо иметь полный доступ к ресурсам Windows и минимальную компьютерную грамотность. Если все делать внимательно и по инструкции, пользователь устранит сбой и вернет работоспособность системы.

Видео по теме:

Contents

  • What Is a Windows Script Host Error?
  • How to Fix a Windows Script Host Error in Windows 10
    • 1. Run the System File Checker
      • Running the SFC Command in Safe Mode
    • 2. Scan Your Hard Disk for Problematic Sectors Using the CHKDSK Utility
      • Checking Your Disk via File Explorer
      • Checking your disk via Command Prompt
    • 3. Run a Full Malware Scan
    • 4. Run the Microsoft Safety Scanner
    • 5. Perform a Clean Boot
      • Easier Way to Isolate the Responsible Program
    • 6. Return the Default Value of .vbs to VBSfile in the Registry Editor
      • How to Back Up the System Registry
      • Here’s How to Change the Default Value of .vbs:
      • How to Delete the VMApplet and WinStationDisabled strings in the Registry Editor. 
  • Conclusion
  • FAQ
    • How to Remove Windows Script Host Error in Windows 7?
    • What is Windows Script Host?
    • What are Windows Script Host Settings?
    • What Is a Script Error?

How to Fix Windows Script Host Errors on Windows 10 Startup?

If you’ve had enough of the Windows Script Host error popping up whenever you boot your system or try to start an application, this page is where you should be. 

You can temporarily remove the error message by ending the corresponding process in the Task Manager, but we have permanent solutions for you. 

This article will show you how to eliminate Windows Script Host pop-ups.

Let’s begin. 

What Is a Windows Script Host Error?

First, what is Windows script host? It’s a system tool handling scripts run by system administrators. 

The error occurs when the Windows Script Host tool fails to read a particular script file or encounters any other issue. 

The problem might be due to a malicious program, faulty system file, bad script file, or defective hard disk.

How to Fix a Windows Script Host Error in Windows 10

The following guides will show you how to fix Windows script problems on startup or when you launch apps.

1. Run the System File Checker

Microsoft Windows based script host errors can result from faulty system files. Malicious programs might have compromised these files or might be victims of application conflicts. In some cases, you might have tampered with them.

You can easily replace bad or missing system files using the System File Checker (SFC). SFC is a built-in command-line program. Microsoft provided the tool for such purposes.

In older Windows versions, you must fire up the Command Prompt with admin privileges and run the SFC line. However, in Windows 10, you must run DISM before running SFC. 

DISM is another built-in command-line tool. Its job is to provide the files that will be used by the SFC tool for the repair process.

Here’s a simple guide on how to run the SFC command properly:

  • Type “Command Prompt” in the search bar
  • Right-click on it and select “Run as administrator.” 
  • Select Yes once the User Account Control dialog requests permission.
  • When the Command Prompt window opens, type “DISM.exe /Online /Cleanup-image /Restorehealth” and press “Enter.”

Command Prompt RestoreHealth

  • Allow the DISM tool to use the Windows Update utility to provide the repair files before running the SFC tool. 

Run Command Prompt as Administrator

If Windows Update fails to provide the repair files, you’ll have to use the DISM tool to fetch the repair files from a different source, such as a bootable USB or Windows 10 DVD. 

You’ll also have to enter the following command instead: “DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess”

Important Note: The “C:\RepairSource\Windows” part of the command should be replaced with the Windows directory on the USB drive.

  • Once the DISM tool has completed its job, go to a new line and type “sfc /scannow” (no quotes) into the Command Prompt window, then press “Enter.”

Command Prompt Restore Operation

  • The utility will scan your PC for bad and missing system files and replace them automatically.
  • Wait until the verification process is 100% complete before you close the Command Prompt.

Command Prompt scannow

You’ll see a completion message that tells you the process results. The message that reads “Windows Resource Protection did not find any integrity violations” means you don’t have broken system files. 

The message, “Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log C:\Windows\Logs\CBS\CBS.log” means that bad system files were found and replaced.

Running the SFC Command in Safe Mode

However, if the Command Prompt tells you that “Windows Resource Protection could not perform the requested operation,” you must run the SFC command in Safe Mode. Follow this guide:

  • Switch on your computer and press and hold your power button to turn it off once your computer manufacturer’s logo flashes on your screen. Reboot your PC in that manner twice again until you see the “Please wait” message.
  • Click the “Advanced Options” button after seeing the “Automatic Repair” screen.
  • The “Choose an Option” screen will now appear.
  • Click on “Troubleshoot.”
  • On the Troubleshoot page, click on the “Advanced Options” tile.
  • Click “Startup Settings” once the “Advanced Options” screen appears.
  • Once you see the “Startup Settings” screen, click the “Restart” button.
  • Your system will now reboot to the Startup Options page.
  • Tap the number next to “Safe Mode with networking” (Since you need an internet connection to run the DISM tool to provide the repair files).
  • After your system starts in Safe Mode, go to the “C:\Windows\WinSxS\Temp” folder to confirm that the “PendingDeletes” and “PendingRenames” directories are present.
  • Now, open the Command Prompt as an administrator, then run the DISM and SFC tools.

Related: Windows Command Prompt: Most Useful Commands


2. Scan Your Hard Disk for Problematic Sectors Using the CHKDSK Utility

Every file your computer works with, from system to application files, is stored on your hard disk. Errors will naturally occur when programs and services can’t read files.

This phenomenon doesn’t exclude the Windows Script Host. Usually, the Windows script error suggests that some files can’t be reached.

The CHKDSK utility is designed to find bad sectors on the hard drive and prevent your system from ever using those sectors. 

It can also attempt to retrieve files stored in those bad sectors, which is not guaranteed always to work. You might have to sacrifice some files.

In this case, the tool might help you recover the file the Windows Script Host is looking for. If it doesn’t, you can rest assured that the problem won’t occur again once you’ve managed to get the file via other means.

Two main ways to run the CHKDSK utility are via the File Explorer and in an elevated Command Prompt window. 


Related: How to Check For and Fix Disk Errors with CHKDSK Command 


Here’s how to use both methods.

Checking Your Disk via File Explorer

  • Double-click on any folder on your desktop to open a File Explorer window. The “Windows + E” keyboard shortcut is another way to launch Windows File Explorer.
  • After File Explorer opens, navigate to the left pane and click “This PC.”

Checking Your Disk via File Explorer

  • Switch to the right pane and right-click on the drive where Windows is installed.
  • Click on “Properties” in the context menu.

This PC Properties

  • When you see the Properties dialog window, head to the “Tools” tab, then click on “Check” under “Error Checking.”
  • Click on “Scan Drive” after the “You don’t need to scan this drive” dialog message appears.
  • The CHKDSK tool will now scan your hard disk for errors.
  • After the scan, a dialog will appear and show you the results. After, check to see if the Windows script file error has been fixed. 

Checking your disk via Command Prompt

If the File Explorer method doesn’t resolve the problem, open the Command Prompt window to run a more in-depth and advanced check.

The guide below will show you how:

  • Go to the search box in the Start menu and type “Command Prompt.
  • Once Command Prompt appears in the search results, right-click it and select “Run as administrator.”
  • Select “Yes” once the User Account Control dialog window requests permission.
  • After the Command Prompt window opens, type “chkdsk C: /f /r /x” into the new line and hit “Enter.”

Note: The “C” in the command line should be replaced with the drive letter of your Windows volume.


If you see the message “Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)”, it means other applications currently use the volume you’re trying to scan. 

Hit the “Y” keyboard button if the Command Prompt asks you to schedule the scan for your next reboot. Once you tap Y, restart your computer to complete the check, then check for the error.

3. Run a Full Malware Scan

One of the main causes of the Windows Script Host error is malware infection. Hackers have the ugly habit of designing malware programs to clone or completely replace script files to wreak havoc without detection.

With the technical know-how, these hidden malicious scripts can be fished out. However, you can use an anti-malware program to search and delete malware infections. 

You can check out Auslogics Anti-Malware software to thoroughly scan folders and restricted areas where the malware program might be hiding. 


Learn more from this program here: Auslogics Anti-Malware: Features and Reviews.


Whether you’re using a third-party antivirus or Windows Security, ensure your system is up to date. This way, you’re sure the program is fortified with the latest virus definitions. 

If you use Windows Security, follow these steps:

  • Go to your taskbar’s notification area and click the arrow to expand the system tray.
  • After the hidden icons appear, open Windows Security.

Windows Security

  • Next, click on “Virus & Threat Protection.”
  • Once the “Virus & Threat Protection” window appears, click on Scan Options.

Virus and Threat Protection

  • When you reach the “Scan Options” page, select the Full Scan option, then click the “Scan Now” button.

Windows Security full scan

  • Note that the full scan can take up to several hours. So, allow your system to run the operation and return later.
  • After the scan is complete, prompt the antivirus to remove the malware programs it found.

Related: How to Remove Virus and Other Malware from Windows 


4. Run the Microsoft Safety Scanner

The Microsoft Safety Scanner is an advanced Microsoft-developed virus-removal tool. It checks for security risks and removes them. Once it finds malicious programs, it will try undoing the changes they’ve made to your computer.

Some users reported positive results after running the tool.

Follow these steps to use the utility:

  • Make sure you download the program’s latest version from Microsoft’s website.
  • After you download the EXE file, run it.
  • Select “Yes” in the User Account Control dialog panel.
  • Once the program opens, choose the type of scan you want it to run. Go for the Full Scan option to scan the entire system.
  • The scan can take hours to complete. You can run it when you’re less busy rather than stick to your computer while it runs.
  • Click on Next.
  • After the scan completes, allow the tool to take necessary actions if it finds any malicious program. Then check if the Windows script host issue has been resolved. 

5. Perform a Clean Boot

A startup application may be responsible since the Windows Script Host error usually occurs during or immediately after startup.

Startup applications are programmed to launch whenever Windows starts. They’re essentially the first set of programs the operating system wakes up after the boot.

One or more of these apps and services could get in the way of the Windows Script Host and trigger the startup error you see. You can find the responsible program by performing a clean boot. 

The clean boot technique prevents non-Windows-related startup applications from launching after you reboot your system. Once you’ve done that, check if the Windows Script Host error occurs again.

Here’s a guide on how to perform a clean boot and figure out which startup program is causing the error:

  • Right-click the start button to open the Power User menu, then click Run. Punch the “Windows logo + R” keyboard buttons together to open “Run.”
  • Once you see the Run dialog box, go to the text field, type “msconfig” and hit the Enter button on your keyboard.

  • Once the System Configuration dialog window appears, switch to the Services tab.
  • Navigate toward the Services tab’s bottom-left corner and check the “Hide all Microsoft services” checkbox. Doing this will prevent Windows from blocking Microsoft-related services.

Windows System Configuration

  • Now, click on the “Disable All button.”

Windows System Configuration disable all

  • Next, head to the “Startup” tab and click “Open Task Manager.
  • Once you get to the Task Manager’s Startup tab, disable every program you see by clicking each program and clicking on the “Disable” button.

Windows Task Manager

  • Return to the “System Configuration” dialog window and click “OK.”
  • Restart your system and check if the script error has been resolved. 

If the error does not pop up once your system comes up, you just confirmed the involvement of a startup application or service. 

To find the responsible entity, you have to enable the startup items one after the other and restart your system after enabling each. At some point, one item will trigger the error again.


Also Read: Quick Tips: How to Disable Startup Programs in Windows 10


Easier Way to Isolate the Responsible Program

  • Open the “System Configuration” dialog window and switch to the “Services” tab.
  • Go to the Services tab, uncheck half of the startup services, and click “Enable All.”
  • Restart your system and see if the error is resolved. If the error doesn’t appear, none of the services you have enabled is the culprit. You’ll have to enable the other half and restart your system to see if the error happens again.
  • If the error shows up after enabling one group of the startup services, you only have to focus on checking them one after the other instead of checking everything.

6. Return the Default Value of .vbs to VBSfile in the Registry Editor

VBS is a type of scripting file that the WSH (Windows Script Host) can run. Many WSH errors point to faulty or misconfigured VBS files, and making a few changes to the system registry may fix the problem. We’ll show you the steps to take.

Before you begin, note that the system registry is one of your operating system’s most advanced and sensitive areas. A single mistake can render your computer unusable. 


Also Read: What is the Windows Registry And Why Do You Need a Registry Cleaner?


So, make sure you tread with caution. If you don’t know your way around the registry or aren’t comfortable using it, get someone with expertise to apply the solution.

However, if you want to handle things yourself, we recommend backing up the entire registry to be safe. If you can do that yourself, head straight to the solution to find out how to adjust the default .vbs value.

However, keep reading if you don’t know how to back up the registry.

How to Back Up the System Registry

  • Press the Windows logo and R buttons to launch the Run dialog window.
  • After Run opens, go to the text field, type “Regedit,” and click the “OK” button.
  • Click the “Yes” button once the User Account Control dialog window pops up and request permission.

Windows 10 Registry Editor

  • When the Registry Editor opens, go to the window’s top-left corner and click on File.
  • Select Export from the context menu.

Registry Editor Export

  • Once the Export Registry File dialog window opens, select All under Export Range.
  • Navigate to the folder where you’d like to save the backup, enter a name for the file, and then click on the Save button.

That’s it! When restoring the registry, open the Registry Editor and click on File >> Import. Go to the folder where you saved the backup file and double-click it.

Here’s How to Change the Default Value of .vbs:

  • Press the “Windows logo + R” buttons to launch the Run dialog window.
  • After Run opens, go to the text field, type “Regedit,” and click the OK button.
  • Click the “Yes” button once the User Account Control dialog window pops up and request permission.
  • When the Registry Editor opens, go to the left pane and expand “HKEY_CLASSES_ROOT.”

Here’s How to Change the Default Value of .vbs-

  • Under HKEY_CLASSES_ROOT, click on .vbs.

How to Change the Default Value of .vbs-

  • Navigate to the right pane and double-click on the Default string.
  • Once the Edit String dialog opens, go to the Value Data text box and change the value to VBSfile.
  • Click on OK.

How to Delete the VMApplet and WinStationDisabled strings in the Registry Editor. 

  • Open the Registry Editor and head to the left pane.
  • Navigate to “Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon.”
  • Single-click on WinLogon, then switch to the right pane.
  • Scroll down and delete the VMApplet and WinStationDisabled entries.
  • Next, double-click Usernit.
  • Replace its value data with “C:\Windows\system32\userinit.exe” (no quotes) and click on OK.

Conclusion

It can be very annoying to deal with the Windows Script Host error, especially if it continues occurring when you launch programs or start your computer. Luckily, we’ve covered the solutions in this guide.

We’ve examined the root causes of this mistake and provided step-by-step instructions on repairing it in this guide.

We’ve discussed fixing your system files with tools like System File Checker (SFC), looking for and getting rid of any nasty malware, and even changing some computer settings to fix the error.

Remember that even though we’ve tried to keep things easy, you should exercise caution when changing your computer. Pay great attention to the instructions, and ask a computer expert for clarification if you’re unsure of anything.

FAQ

How to Remove Windows Script Host Error in Windows 7?

There are measures you can take to fix the Windows Startup Script error in Windows 7, despite how frustrating it can be. Scripts running on your system that are malicious or incompatible frequently produce this message. You can run a comprehensive malware scan to ensure that no dangerous scripts are to blame for the problem.

Another way is to turn off or delete any shady or pointless startup programs that could be the source of the issue.

What is Windows Script Host?

With the help of Windows Script Host, you can automate processes and run scripts on Windows operating systems. It offers a platform on which scripts written in other scripting languages, such as VBScript and JScript, can be executed. These scripts can manage files and folders, connect with system components, automate processes, and carry out various other functions on your computer.

What are Windows Script Host Settings?

Windows Script Host Settings are the configuration choices that manage how Windows Script Host runs scripts. The Windows Registry provides access to and editing capabilities for these settings. Aspects like timeout settings, script execution rights, and error-handling behavior are all under the user’s control.

What Is a Script Error?

An issue that arises while executing a script is a script error, typically in web browsers or scripting environments. These problems happen when a bug in the script’s code prevents it from running correctly.

When visiting websites with interactive elements that employ JavaScript, script errors are frequently encountered. They may appear as pop-up error warnings or may be recorded in the browser developer console.

Ошибка «Windows Script Host» часто встречается на Windows 10, 8, 7. Причиной их возникновения нередко служат регулярные обновления от компании Майкрософт. И при чем не важно: официальная у вас «винда», или пиратская.

Далее разберем подробно основные причины данной ошибки и как его исправить.

Сбои могут появиться в самое неожиданное время при установке различных ПО, игр и т.д. Сопровождается такая ошибка определенным кодом и сообщением «не удаётся найти указанный файл сценария».

Содержание

  1. «Windows Script Host» что это такое
  2. «Windows Script Host» исправить быстро и легко
  3. Способ 1: Настройка корректного времени на компьютере
  4. Способ 2: Отключение Центра обновлений
  5. Способ 3: Удаление некорректно установленных обновлений
  6. Способ 4: Установка лицензионной Windows
  7. Вывод

«Windows Script Host» что это такое

Наиболее часто встречающаяся — ошибка 80070002. Как бы ни существовал длинный список различных кодов, их решение почти одинаковое.

Решение подобных конфликтов в большинстве случаев займет не больше 5 минут. Мы рассмотрим самые проверенные методы, которые помогут вам избавиться от данной ошибки. Эти способы признаны оптимальными на официальном сайте сообщества Майкрософт и получили одобрение большинства пользователей Виндовс.

Выделим наиболее распространенные причины возникновения конфликта «Виндовс Скрипт Хост»:

  • Не точное системное время.
  • Неполадки в работе службы обновлений.
  • Загрузка очередного обновления со сбоями.
  • Пиратская копия «винды».

«Windows Script Host» исправить быстро и легко

Способ 1: Настройка корректного времени на компьютере

Системное время, которое отображается в области уведомлений, выполняет ряд задач. Одни программы, при обращении к серверам разработчиков или к другим подобным ресурсам, могут выдавать сбои из-за расхождений в дате и времени.

Так что всегда проверяем правильность времени ПК.

  1. Кликаем на часы в панели задач рабочего стола и открываем настройки;
  2. Затем переходим на вкладку «Время по интернету»и заходим в параметры. Важно учесть, что ваша учетная запись обязана иметь права администратора.
  3. В открывшемся окне ставим галочку перед «Синхронизировать с сервером времени в Интернет», далее из имеющегося списка «Сервер»выбираем windows.com и кликаем «Обновить сейчас».
  4. Об успешном завершении настройки вас уведомит соответствующая надпись. Если возникнет ошибка из-за превышенного времени ожидания пробуем обновить время еще раз.

С этих пор время вашего ПК будет периодически синхронизироваться с сервером времени Microsoft и проблем с расхождением не возникнет.

Способ 2: Отключение Центра обновлений

Одним из частых причин является неудачное обновление системы.

Чему могут способствовать загруженность системы, а также сбои в сети интернет.

  • Щелкните на «Пуск» и откройте «Панель управления».
  • Зайдите в «Администрирование».
  • Откройте «Службы».
  • Затем выберите «Центр обновления Windows».
  • Щелкните ПКМ. Далее выберите «Остановить».
  • Перезагрузите вашу ОС.

С помощью таких простых действий отключаем попытки системы получить свежие обновления, послужившие причиной возникновения конфликта «Виндовс Скрипт Хост».

Способ 3: Удаление некорректно установленных обновлений

Этот способ представляет собой удаление тех обновлений, после установления которых начались неполадки в Windows Script Host. Устранить это можно двумя способами: вручную и через восстановление системы.

На заметку! Какой бы вариант вы ни выбрали, важно помнить хотя бы примерную дату, после которой начались неполадки.

Метод вручную

  1. Заходим в «Панель управления»и открываем «Программы и компоненты».
  2. Далее смотрим, какие обновления установлены, нажав соответствующую кнопку.
  3. Появится весь список обновлений. Для удобства отсортируем их по дате установки, нажав по шапке столбца «Установлено».
  4. И удаляем все обновления, которые установлены после появления неполадок (смотрим дату).
  5. Далее перезагружаем ПК.

кнопка пуска

Утилита восстановления

  1. Чтобы перейти к данной утилите открываем «Свойства» компьютера.
  2. Далее заходим в «Защиту системы».
  3. Кликаем по кнопке «Восстановление».
  4. В окне программы нажимаем «Далее».
  5. Ставим галочку, чтобы отобразить дополнительные точки восстановления. Нам нужны позиции «Автоматически созданная точка». Из них выбираем ту, что подходит дате последнего обновления.
  6. Жмем «Далее», дожидаемся, когда система предложит перезагрузить ПК и совершит процедуру по восстановлению к выбранному состоянию.

Полезно: Важно помнить, что такой процесс может повлечь за собой удаление программ и драйверов, установленные после выбранной даты. Для того, чтобы узнать коснется это вас или нет смотрим список затрагиваемых программ, нажав соответствующую кнопку.

Способ 4: Установка лицензионной Windows

Единственный плюс пиратской версии Виндовс – это то, что они бесплатны. Намного больше от них неудобств, в том числе, некорректную работу важных компонентов.

В данном случае советы по устранению ошибки, указанные выше, могут не решить проблему: исходники файлов уже были сбойными. Здесь остается порекомендовать поискать другой дистрибутив, но желательно, конечно, установить лицензионную версию Windows.

Вывод

Приведенные выше советы помогут вам устранить системную ошибку «Виндовс Скрипт Хост» наиболее простым и доступным образом. Но в случае, если проблема все же не решилась, тогда единственным решением остается переустановка системы, тем более если у вас пиратская версия Виндовс.

Errors that seem to come out of nowhere are nothing new in Windows. Case in point, Windows Script Host errors belong to this category and can affect users on Windows 11 or 10 as well as earlier versions. Let’s look at the possible reasons behind these issues and how you can fix them.

Tip: Did you know you can assign specific CPU cores to an application in Windows? We show you how.

Content

  • What Causes a Windows Script Host Error
  • 1. Check Windows Script Host in Registry
  • 2. Use Microsoft Safety Scanner
  • 3. Check VBS File Value in Registry
  • 4. Delete Entries After Userinit in Registry
  • Frequently Asked Questions

What Causes a Windows Script Host Error

Windows Script Host (WSH) is a built-in automation tool in Windows that allows administrators to execute various scripts like VBScript and JScript. While WSH tasks are fairly common and run in the background, you might sometimes encounter errors like «Windows Script Host access is disabled on this machine.»

Errors like these can usually be traced back to registry errors, malware infection, VBS script file issues, or other corrupted files. To fix a Windows Script Host error you’ve encountered, you can try the below fixes in sequence.

1. Check Windows Script Host in Registry

Due to a number of reasons, Windows Script Host might simply be disabled on your system. A program you installed or some system settings you don’t remember changing could be the reason behind this. To check if this is indeed the case, you can use the Registry Editor as follows:

  1. Press Win + R to open the «Run» dialog box.
  2. Type regedit and press Enter to open the Registry Editor.
  3. Open «HKEY_CURRENT_USER -> Software -> Microsoft -> Windows Script Host -> Settings.»
Windows Script Host Registry Settings Enabled
  1. On the right-hand side pane, double-click the «Enabled» value and check the «Value data» field. Make sure it’s set to «1» and click «OK.»
Windows Script Host Registry Settings Enabled Value
  1. If there is no «Enabled» value, you can create it. Right-click in the empty space on the right-hand side pane and select «New -> DWORD (32-bit) Value.» Set the name of this newly-created value to «Enabled.» Click «OK» and set its «Value data» to «1» to complete the process.
Windows Script Host Registry Settings Create Enabled 1
  1. Restart your computer for the changes to take effect.

2. Use Microsoft Safety Scanner

Windows Script Host errors are often caused due to malware infection. You can use a free tool called Microsoft Safety Scanner to scan your system for malware and remove them to fix your WSH error. You can also employ the help of a third-party antivirus program to run a system scan. Here’s how to use Microsoft Safety Scanner.

  1. Download Microsoft Safety Scanner from Microsoft’s website.
  2. Launch the downloaded executable, and select «Full scan» for a comprehensive malware check of your system.
Windows Script Host Microsoft Safety Scanner
  1. Click «Next» to initiate the scan and follow the on-screen instructions to complete the process.

Good to know: Windows Defender is enough for all the antivirus protection you need on your system.

3. Check VBS File Value in Registry

The Virtual Basic Script (VBS) is a Windows file containing information required by the Windows Script Host tool to run several scripts. It can sometimes be configured incorrectly, causing one or more WSH errors. You can check the VBS file using the Registry Editor to try to fix the errors.

  1. Open Registry Editor from the «Run» dialog box.
  2. Open «HKEY_CLASSES_ROOT -> .vbs» and double-click the «(Default)» value on the right-hand side pane.
Windows Script Host Registry Vbs
  1. Ensure that the «Value data» is set to «VBSFile» and click «OK.»
Windows Script Host Registry Vbs Value
  1. Don’t forget to restart your computer for the changes to take into effect.

4. Delete Entries After Userinit in Registry

Users can also encounter Windows Script Host errors during system startup. To fix these kinds of issues, you can delete a few registry entries in the Registry Editor and see if it helps. Follow the steps below to do so:

  1. Open Registry Editorfrom the «Run» dialog box.
  2. Open «HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows NT -> CurrentVersion -> Winlogon.»
Windows Script Host Registry Userinit
  1. Delete all the entries following «Userinit.» In this example, these are «VMApplet» and «WinStationsDisabled.»
Windows Script Host Registry Userinit Delete Entries
  1. Double-click «Userinit» and ensure the «Value data» is set to «C:\Windows\system32\userinit.exe.»
Windows Script Host Registry Userinit Value
  1. Click «OK» and restart your computer.

Tip: Fix the most common Windows problems with our easy guide.

Frequently Asked Questions

Can Windows Script Host be misused by malware?

Windows scripts are useful tools used by your system to run important tasks. But they can also be misused by hackers to infect your system. These malicious scripts can be delivered to your system via email, documents, and other programs posing as legitimate software. Once these scripts are on your system, Windows Script Host can end up executing them and infecting your system with the intended malware.

What to do if Windows script errors keep coming back?

If you tried all the fixes we detailed in this article, and these errors are still coming back, you might need to repair your Windows installation. In case that doesn’t help either, you can opt for the last resort of reinstalling Windows. Here’s a simple guide to reinstalling Windows without losing your files.

Can I delete a virus from my computer without an antivirus?

Image credit: Christin Hume via Unsplash. All screenshots by Tanveer Singh.

Tanveer Singh

Tanveer Singh

Tanveer hunts far and wide for PC Hardware, Windows, and Gaming ideas to write about. An MBA in Marketing and the owner of a PC building business, he has written extensively on Technology, Gaming, and Marketing. When not scouring the web, he can be found binging on The Office, running for his life in GTFO, or wrecking karts in Smash Karts.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Понравилась статья? Поделить с друзьями:
  • Midea mcfd42900 ошибка e1
  • Midea mca 48hr коды ошибок
  • Mid45s510 ошибка e3
  • Microsoft visual studio возникли ошибки сборки
  • Midas dll ошибка загрузки