Windows script host настройка завершилась с ошибками

Некоторые пользователи Windows 11, Windows 10 могут столкнуться с сообщениями об ошибках Windows Script Host при входе в систему, запуске каких-либо программ и в других ситуациях. Сами ошибки могут отличаться: «Не удается найти указанный файл», «Не удается найти файл сценария», «Не удается сохранить ярлык» и другие.

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

Самопроизвольное появление ошибок Windows Script Host при входе в систему или во время работы

Самый частый случай появления проблемы — ошибка появляется без каких-либо действий со стороны пользователя: обычно при входе в Windows, иногда — во время работы в произвольные моменты времени. Типичные сообщения Windows Script Host об ошибке для этой ситуации:

  • Не удается найти указанный файл, код 80070002
  • Не удается найти файл сценария
  • На данном компьютере отключен доступ к серверу сценариев Windows. Обратитесь к системному администратору
    Отключен доступ к серверу сценариев Windows

При этом сам файл сценария (скрипт) — это обычно какой-либо файл с расширением .vbs, имеющий название похожий на что-то системное, имеющее отношение к обновлениям, Windows, иногда — просто run.vbs

Обычно причина ошибки Windows Script Host в данном случае — наличие прописанного автоматического запуска скрипта .vbs в автозагрузке Windows, либо в планировщике заданий.

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

Общий порядок действий для этой ситуации:

  1. Скачайте утилиту Autoruns с сайта Майкрософт , распакуйте у себя на компьютере в удобное расположение и запустите утилиту.
  2. Используйте поле быстрого поиска для того, чтобы найти записи в автозагрузке, запускающие скрипты .vbs, для этого достаточно ввести соответствующее расширение в поле поиска (фильтра).
    Поиск запуска скриптов vbs в Autoruns

  3. Если такие элементы были найдены, вы можете удалить их, нажав по ним правой кнопкой мыши и выбрав соответствующий пункт контекстного меню.
  4. Также выполните поиск по wscript и изучите найденные элементы: если они подозрительны, имеет смысл удалить их.

После удаления всех записей для запуска файла в автозагрузке Windows, рекомендую:

  • Удалить и сам этот файл: обычно он располагается в одной из папок с временными файлами.
  • Выполнить дополнительную проверку компьютера на вирусы и наличие вредоносных программ, например, с помощью KVRT (не требует установки на компьютер и не конфликтует со встроенным антивирусом).

Ошибки Windows Script Host при установке программ и игр

Остатки работы вредоносного ПО на компьютере — не единственный случай, когда вы можете столкнуться с ошибками Windows Script Host: например, некоторые установщики игр и программ могут использовать скрипты .vbs или другие для создания ярлыков или других задач.

Эти скрипты запускаются с помощью Windows Script Host (wscript.exe) и при сбоях выполнения действий, прописанных в них, вы можете получить те или иные сообщения об ошибках.

Возможные решения для типичных ошибок для данного случая:

  • Если вы видите сообщение Windows Script Host о невозможности создать ярлык — можно попробовать выполнить запуск установщика от имени администратора.
  • При ошибке «На данном компьютере отключен доступ к серверу сценариев Windows» откройте редактор реестра (Win+Rregedit), перейдите к разделу
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings

    и проверьте наличие параметра DWORD с именем Enabled. Если он присутствует и его значение равно 0, дважды нажмите по нему и установите 1 в качестве значения. При отсутствии параметрам, создайте его и задайте значение 1.

    Включение Windows Script Host в редакторе реестра

  • Сообщения об ошибках Windows Script Host «Не удается найти указанный файл, код 80070002» или «Не удается найти файл сценария» в процессе установки игр и программ обычно появляется при установке нелицензионного софта, когда какие-то из файлов автоматически удаляются встроенным антивирусом Windows. О возможных решениях в инструкции Что делать, если Windows сама удаляет файлы.

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

  • Использовать точки восстановления системы
  • Выполнить восстановление целостности системных файлов
  • Установить последние обновления Windows

Если ваша проблема с Windows Script Host отличается от описанных в инструкции, расскажите о том, что именно происходит, какое сообщение об ошибке вы наблюдаете и при каких обстоятельствах. Возможно, я или кто-то из читателей сможет вам помочь.

Are you encountering Windows Script Host error messages like “The system cannot find the file specified for the Startup.vbs script”? Or something like “Windows Script Host access is disabled on this machine”? Normally, these errors are caused by corrupted system files, malware, registry errors, and VBS script file issues.

So, if you’ve had enough of Windows Script Host errors, read on to discover how you can tackle these problems.

What Is the Windows Script Host and Why Is It Giving You Issues?

Fixing PC errors

The Windows Script Host is a built-in tool designed for PC administrators to automate and manage tasks. It provides an environment where you can execute scripts in a variety of languages. By default, this tool interprets and runs VBScript (.VBS and .VBE) files and plain-text JScript (.JS and .JSE) files.

When you encounter Windows Script Host errors, it means that the Windows Script Host tool is failing to read a particular script file. Now that we know this, let’s take a look at how you can handle Windows Script Host errors.

1. Scan Your PC for Viruses and Remove Any Threats

If malware is the main culprit for this error messa you can perform a full scan on your device and remove any harmful programs.

To get started, here are some simple steps to follow:

  1. Type Windows Security in the Windows search bar and select the Best match.
  2. In the next window, select Virus & threat protection.
  3. Next, select Scan options and then choose Full scan from the options that appear.
  4. Finally, press the Scan now button.
Scanning a PC with the Windows Security tool

If you want to scan specific files or perform a quick scan, open the Virus & threat protection settings as per the previous steps and select either the Quick scan or Custom scan option. In addition to this, you could also try running the Microsoft Defender Offline scan.

2. Change the Default Value of the VBS File

The VBS (Virtual Basic Script) is a file containing code that you can run using the Windows Script Host tool. If this file isn’t configured correctly, it could cause several Windows Script Host errors.

So, to tackle this problem, try changing the default value of the VBS file by following these steps:

  1. Press Win + R to open the Run command dialog box.
  2. Type Regedit and press OK to open the Registry Editor.
  3. Navigate to Computer > HKEY_CLASSES_ROOT > .vbs.
  4. Double-click the (Default) value on the right-hand side pane to open it.
Double-clicking the (Default) value in the Registry Editor

In the next window, set the Value data to VBSfile and then press OK to save these settings.

Setting the Value data to VBSfile

When you finish, close the Registry Editor and then restart your PC.

3. Fix Corrupted System Files With SFC and DISM

If Windows Script Host errors are caused by corrupted system files, then the SFC and DISM tools can come in handy. These are two critical tools that you can always depend on in case you want to quickly find and repair mischievous system files.

To get started, here’s how you can run the DISM tool:

  1. Press Win + R to open the Run command dialog box.
  2. Type CMD and press Ctrl + Shift + Enter to open an elevated Command Prompt.
  3. Next, type the following command and then press Enter:

            DISM /Online /Cleanup-Image /ScanHealth
        
  4. Wait for the scan to complete. From there, type the following command and press Enter:

            DISM /Online /Cleanup-Image /RestoreHealth
        
  5. When the scan is complete, restart your PC to apply these changes.
  6. Now you can run the SFC scan. To do this, open the Command Prompt as per the previous steps, type the following command, and then press Enter:

            sfc /scannow
        
  7. When the scan is complete, close the Command Prompt and restart your PC

4. Use the Microsoft Safety Scanner

Computer Security scanner illustration

If you have an antivirus program installed, you could use it to find and remove any harmful programs that might be causing this error. But if you don’t have any antivirus program, then you could give the Microsoft Safety Scanner a try. This is a free and easy-to-use tool designed to quickly find and remove malware from Windows devices.

Here’s how you can use the Microsoft Safety Scanner:

  1. Depending on your system specs, download either the 32- or 64-bit version of the Microsoft Safety Scanner.
  2. Once installed, open the program and select the type of scan you want to run.
  3. Click Next to continue and follow the on-screen instructions to finalize the process.
Running the Microsoft Safety Scanner

5. Use a System Restore Point

Creating restore points is one of the best ways to keep your Windows data safe. In case the Windows Script Host errors are a recent thing, then you can tackle them by restoring your PC to its previous state with a restore point.

So, if you’ve already created a system restore point, here’s how you can use it:

  1. Type Control Panel in the Windows search bar and select the Best match.
  2. Click the View by drop-down menu and select Large icons.
  3. Scroll down and click the Recovery option.
  4. In the next window, click the Open System Restore option and then click Next in the pop-up window.
  5. In the System Restore window, select a restore point and then click Next to continue.
Using a Restore Point

Follow the on-screen instructions to finalize the process and restart your PC when you finish.

6. Enable Windows Script Host Via the Registry Editor

You might run into Windows Script Host errors simply because the Script Host is disabled. To resolve this issue, here’s how you can enable the Script Host via the Registry Editor:

  1. Press Win + R to open the Run command dialog box.
  2. Type Regedit and press OK to open the Registry Editor.
  3. Navigate to HKEY_CURRENT_USER > Software > Microsoft > Windows Script Host > Settings.
Enabling the Windows Script Host Via the Registry Editor

Double-click the Enabled value on the right-hand side pane and then set its Value data to 1.

Setting the Script Host Value data to 1

If you can’t find the Enabled value, create it by following these steps:

  1. Right-click on an empty space on the right-hand side pane and select New > DWORD (32-bit) Value.
  2. Name this new value as Enabled and then click OK.
  3. Finally, double-click on the value and set its Value data to 1.

Easily Tackle Windows Script Host Errors

The Windows Script Host errors are quite irritating, but resolving them is super easy. If you run into such issues, simply follow the tips we’ve provided and you should be good to go. From there, you could even start exploring a couple of Windows scripts that could help you automate your tasks.

Все способы:

  • Исправляем ошибку Windows Script Host
    • Вариант 1: Системное время
    • Вариант 2: Служба обновлений
    • Вариант 3: Некорректно установленные обновления
    • Вариант 4: Нелицензионная Windows
    • Заключение
  • Вопросы и ответы: 13

Windows Script Host – особый компонент операционной системы, который позволяет запускать скрипты, написанные на JS (Java Script), VBS (Visual Basic Script) и других языках. При неправильном его функционировании могут наблюдаться различные сбои во время запуска и работы Windows. Такие ошибки зачастую не могут быть исправлены простой перезагрузкой системы или графической оболочки. Сегодня поговорим о том, какие действия необходимо совершить для устранения неполадок в функционировании компонента WSH.

Исправляем ошибку Windows Script Host

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

Ошибка Windows Script Host вызванная ошибкой в коде скрипта

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

Далее мы поговорим о тех моментах, когда при старте Windows или запуске программ, например, Блокнота или Калькулятора, а также других приложений, использующих системные ресурсы, появляется стандартная ошибка Windows Script Host. Иногда подобных окон может появиться сразу несколько. Случается такое после обновления операционной системы, которое может пройти как в штатном режиме, так и со сбоями.

Ошибка Windows Script Host вызванная сбоем в операционной системе Windows

Причины такого поведения ОС следующие:

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

Вариант 1: Системное время

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

  1. Нажимаем на часы в правом нижнем углу экрана и переходим по ссылке, указанной на скриншоте.
  2. Далее идем на вкладку «Время по интернету» и жмем на кнопку изменения параметров. Обратите внимание, что ваша учетная запись должна обладать правами администратора.

    Переход к настройкам времени по интернету в Windows 7

  3. В окне настроек устанавливаем галку в указанный на изображении чекбокс, затем в выпадающем списке «Сервер» выбираем time.windows.com и нажимаем «Обновить сейчас».

    Настройка синхронизации времени с сервером Майкрософт в Windows 7

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

    Сообщение об успешной синхронизации времени с сервером в Windows 7

Теперь ваше системное время будет регулярно синхронизироваться с сервером времени Майкрософт и расхождения не будет.

Вариант 2: Служба обновлений

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

  1. Вызываем строку «Выполнить» сочетанием клавиш Win+R и в поле с названием «Открыть» пишем команду, которая позволит получить доступ к соответствующей оснастке.

    services.msc

    Переход к системной оснастке Службы в Windows 7 из строки Выполнить

  2. В списке находим «Центр обновления», кликаем ПКМ и выбираем пункт «Свойства».

    Переход к свойствам службы Центра обновления Windows 7

  3. В открывшемся окне жмем кнопку «Остановить», а затем ОК.

    Остановка службы Центра обновления Windows 7

  4. После перезагрузки служба должна запуститься автоматически. Стоит проверить, так ли это и, если она все еще остановлена, включить ее тем же способом.

    Запуск службы Центра обновления Windows 7

Если после выполненных действий ошибки продолжают появляться, то необходимо поработать с уже установленными обновлениями.

Вариант 3: Некорректно установленные обновления

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

Ручное удаление

  1. Идем в «Панель управления» и находим апплет с названием «Программы и компоненты».
    Переход к апплету Программы и компоненты из Панели управления Windows 7

  2. Далее переходим по ссылке, отвечающей за просмотр обновлений.

    Переход к просмотру установленных обновлений в Windows 7

  3. Сортируем список по дате установки, кликнув по шапке последней колонки с надписью «Установлено».

    Сортировка обновлений по дате установки в Windows 7

  4. Выбираем нужное обновление, кликаем ПКМ и выбираем «Удалить». Также поступаем с остальными позициями, помня про дату.

    Удаление установленного обновления в Windows 7

  5. Перезагружаем компьютер.

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

  1. Для перехода к данной утилите кликаем правой кнопкой мыши по значку компьютера на рабочем столе и выбираем пункт «Свойства».
  2. Далее переходим к «Защите системы».

    Переход к настройкам защиты системы в Windows 7

  3. Нажимаем кнопку «Восстановление».

    Запуск утилиты восстановления системы в Windows 7

  4. В открывшемся окне утилиты жмем «Далее».

    Переход к выбору точек восстановления в утилите восстановления Windows 7

  5. Ставим галку, отвечающую за показ дополнительных точек восстановления. Необходимые нам поинты будут называться «Автоматически созданная точка», тип – «Система». Из них необходимо выбрать ту, которая соответствует дате последнего обновления (или того, после которого начались сбои).

    Поиск точек восстановления в системной утилите Windows 7

  6. Жмем «Далее», ждем, пока система предложит перезагрузиться и выполнит действия по «откату» к предыдущему состоянию.

    Запуск процесса восстановления системы Windows 7

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

    Поиск затрагиваемых восстановлением системы программ в Windows 7

Читайте также: Как восстановить систему Windows XP, Windows 8, Windows 10

Вариант 4: Нелицензионная Windows

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

Заключение

Решения проблемы с Windows Script Host довольно просты, и с ними справится даже начинающий пользователь. Причина здесь ровно одна: некорректная работа инструмента обновления системы. В случае с пиратскими дистрибутивами можно дать следующий совет: пользуйтесь только лицензионными продуктами. И да, правильно пишите ваши скрипты.

Наша группа в TelegramПолезные советы и помощь

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

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

Как исправить ошибку Windows Script Host

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

Решение 1. Просканируйте свой компьютер на наличие вредоносных программ

Хотя на рынке существует множество сторонних приложений для защиты системы, Windows включает в себя бесплатный антивирус — Защитник Windows. В настоящее время это программное обеспечение находится на одном уровне со многими известными поставщиками ПО безопасности. Поэтому при отсутствии на компьютере стороннего антивируса, используйте его. Первым делом необходимо выяснить, заключается ли проблема в наличии вредоносных программ на ПК.

Просканируете компьютер:

  1. Щелкните правой кнопкой мыши Пуск и выберите Параметры.
  2. Перейдите к обновлению и безопасности.
  3. Выберите Безопасность Windows слева и нажмите Защита от вирусов и угроз.
  4. Затем кликните на Параметры сканирования;
  5. Нажмите флажок Проверка автономного Защитника Windows и Сканировать сейчас.

Как исправить ошибку Windows Script Host

Это действие перезагрузит компьютер и запустит глубокое сканирование системы.

Решение 2. Запустите сканирование SFC и DISM

Средство проверки системных файлов может диагностировать и восстанавливать проблемные или повреждённые системные данные Windows:

  1. Введите cmd в поиске Windows.
  2. Щелкните правой кнопкой мыши командную строку и выберите Запуск от имени администратора.
  3. В новом окне введите sfc /scannow и нажмите Enter. Выполните сканирование SFC.
  4. Дождитесь завершения работы программы, и перезагрузите компьютер.

Как исправить ошибку Windows Script Host

Если сканирование SFC ничего не нашло или не смогло исправить обнаруженные нарушения целостности, вам следует выполнить восстановление образа Windows с помощью DISM. Откройте командную строку от имени администратора ещё раз и запустите следующие команды, нажимая Enter после каждой:

  • Dism/Online/Cleanup-Image/CheckHealth;
  • Dism/Online/Cleanup-Image/ScanHealth;
  • Dism/Online/Cleanup-Image/RestoreHealth.

Решение 3. Восстановите значение VBS по умолчанию через реестр

Неправильное изменение реестра Windows может привести к ошибкам, повреждению системных файлов и ОС. Убедитесь, что вы сделали резервную копию базы данных, прежде чем переходить к следующим шагам.

  1. Введите regedit в поиске Windows и нажмите Enter.
  2. Зайдите в реестр. Если отобразится Контроль учётных записей пользователей, нажмите Да.
  3. В открывшемся окне реестра нажмите на строку Правка, а затем — Найти и введите Vbs — нужно найти одноименную папку.
  4. Дважды щелкните ключ по умолчанию справа.
  5. Убедитесь, что для ключа установлено значение VBSFile, и нажмите OK.
  6. Восстановите значение VBS по умолчанию.

Как исправить ошибку Windows Script Host

Решение 4. Отключите Windows Script Host через реестр

Windows Script Host был представлен в Windows 98 — он позволяет запускать на компьютере больше языков программирования. К сожалению, если вредоносному ПО удастся проникнуть в устройство, оно может злоупотребить этим и получить доступ к большему количеству внутренних функций. Таким образом, полное отключение Windows Script Host, если он не используется, является хорошей практикой безопасности, которая также остановит появление связанной с ним ошибки.

  1. Введите regedit в поиске Windows и нажмите Enter.
  2. После захода в редактор реестра перейдите по следующему пути: HKEY_CURRENT_USER\Software\ Microsoft\Windows Script Host\Settings\.
  3. Если справа вы не видите ключ Enabled, создайте его.
  4. Для этого щелкните правой кнопкой мыши в пустое место в правом окне и выберите «Создать»> «Значение DWORD (32 бита)».
  5. После появления ключа дважды щелкните по нему ЛКМ и установите для него значение 0 Отключить хост Windows Script.
  6. Теперь перейдите по следующему пути и повторите шаги, описанные выше: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings\.

Как исправить ошибку Windows Script Host

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

Table of contents

  • What Is a Windows Script Host Error?
  • How to Fix a Windows Script Host Error in Windows 10
    • Fix 1: Run the System File Checker
    • Fix 2: Scan your hard disk for problematic sectors using the CHKDSK utility
    • Fix 3: Run a full malware scan
    • Fix 4: Run the Microsoft safety scanner
    • Fix 5: Perform a clean boot
    • Fix 6: Return the default value of .vbs to VBSfile in the registry editor
      • Here’s how to change the default value of .vbs:
      • How to delete the VMApplet and WinStationDisabled strings in the registry editor. 
  • Conclusion
  • FAQ

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 a 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.

Fix 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.

The System File Checker (SFC) is a built-in command-line program that Microsoft provides for replacing bad or missing system files.

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.

Type in DISM.exe /Online /Cleanup-image /Restorehealth

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

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

If Windows Update fails to provide the repair files, you’ll have to use the DISM tool to fetch them 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

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 /scannowinto the Command Prompt window, then press Enter.

Type in sfc/scannow

  • 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.

Wait until the verification process is 100% complete before you close the Command Prompt

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


Fix 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 i s 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, but this is not guaranteed to always 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 will not occur again once you’ve obtained the file elsewhere.

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

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.

After File Explorer opens, navigate to the left pane and click  <em>This PC</em>» src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Checking-Your-Disk-via-File-Explorer-.webp»></p>
<div class= Картинка с сайта: www.auslogics.com

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

Click on  <em>Properties</em> in the context menu » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/This-PC-Properties.webp»></p>
<div class= Картинка с сайта: www.auslogics.com

  • When you see the Properties dialog window, go to the Tools tab and  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 PromptIf 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.


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


Fix 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 removed. However, you can use an anti-malware program to search for and delete malware infections. 

PRO TIP

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

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.

After the hidden icons appear, open <em>Windows Security</em> » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Windows-Security.png»></p>
<div class= Картинка с сайта: www.auslogics.com

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

Once the  <em>Virus & Threat Protection</em> window appears, click on <em>Scan Options</em> » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Virus-and-Threat-Protection-1.png»></p>
<div class= Картинка с сайта: www.auslogics.com

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

Virus and Threat Protection

  • 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 


Fix 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. Rather than staying on your computer while it runs, you can run it when you’re less busy.
  • 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. 

Fix 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 interfere with the Windows Script Host and trigger the startup error you see. By performing a clean boot, you can find the responsible program.

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 key + 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.

Type in msconfig

  • 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.

Click on the  <em>Disable All button</em>» src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Windows-Sysrem-Configuration-disable-all.png»></p>
<div class= Картинка с сайта: www.auslogics.com

Once you get to the Task Manager’s Startup tab, you can disable every program you see by clicking on each one and clicking on the  <em>Disable</em> button » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Windows-Task-Manager.png»></p>
<div class= Картинка с сайта: www.auslogics.com

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. Easier Way to Isolate the Responsible Program


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


Fix 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.  So, 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

Windows 10 Registry Editor

Select <em>Export</em> from the context menu » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/Registry-Editor-Export.png»></p>
<div class= Картинка с сайта: www.auslogics.com

That’s it! To restore the registry, open the Registry Editor and click on File > Import. Then, go to the folder where you saved the backup file and double-click it.

Here’s how to change the default value of .vbs:

How to Change the Default Value of .vbs-

Under <em>HKEY_CLASSES_ROOT</em>, click on .vbs » src=»https://www.auslogics.com/en/articles/wp-content/uploads/2023/08/How-to-Change-the-Default-Value-of-.vbs-.webp»></p>
<div class= Картинка с сайта: www.auslogics.com

How to delete the VMApplet and WinStationDisabled strings in the registry editor. 

Download Auslogics Anti-Malware

Detects malware, spyware and viruses, then safely removes them from your PC to help keep it as secure as possible. The program is made to complement your main antivirus.


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


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, this guide covers the solutions.

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), detecting and eliminating 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?

Windows Script Host helps you 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.

Script errors are frequently encountered when visiting websites with interactive elements that employ JavaScript.

They may appear as pop-up error warnings or be recorded in the browser developer console.

Источник

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Libreoffice не устанавливается в windows 10
  • Добавить маршрут windows cmd
  • Your phone companion link to windows
  • Gtx 1070 driver windows 10 64
  • Нельзя просматривать защищенное содержимое на этом устройстве windows 10 как исправить