Introduction
Are you a Windows user constantly getting interrupted by the «Windows Script Host» error message? Does the phrase «Can Not Find Script File» now sound all too familiar? Then, you’ve come to the right place. In this comprehensive guide, we’re going to show you how to put an end to these disruptions. We’ll lead you through a few straightforward methods, including using the Autorun utility, tweaking the Registry Editor, and running system checks with SFC and DISM commands.
Correcting the «Windows Script Host» Error with Autoruns
Encountering the «Windows Script Host» error that says «Can Not Find Script File» can certainly disrupt your workflow. Fortunately, the Autoruns utility can provide a straightforward solution to this issue.
Commence the process by obtaining the Autoruns utility from the official Microsoft website. After successfully installing Autoruns, launch the utility and navigate to the «Logon» tab. Examine the list for any entries tied to vbs files. Upon locating such an entry, deselect the corresponding box. A system reboot follows this action. This reboot helps apply the changes made and is key to fixing the vexing «Can Not Find Script File» error that has been hindering your Windows experience.
Download and Run the Microsoft Autoruns Utility
Fix the Windows Script Host via Registry Editor
To further resolve the «Windows Script Host» error, your Windows Registry Editor comes in handy. Initiate the process by opening the Registry Editor: type «regedit» into your Start menu’s search bar and press enter.
Once inside the Registry Editor, navigate to the path: «HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings«. In the right-hand panel, find the «Enabled» key. Double-click it and set the value data to «1». Confirm this change by clicking OK. Conclude this process by restarting your computer to let the changes take effect.
Additionally, there’s a need to alter the default value for the .vbs key. Revisit the Registry Editor and proceed to the path: «HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command«. Here, look for the «(Default)» key in the right pane, double-click it, and ensure the value data is «%SystemRoot%\System32\WScript.exe «%1» %*«. Modify the value if it differs from the recommended setting. Save the changes by clicking OK, close the Registry Editor, and restart your PC to verify if the «Can Not Find Script File» error has been resolved.
Registry Editor Changes
Leverage Command Prompt to Repair Corrupted System Files
The ultimate solution to the «Windows Script Host» error lies in using the System File Checker (SFC) and Deployment Image Servicing and Management (DISM) commands, both powerful tools in diagnosing and repairing system file issues.
Kick-start the process by opening the Command Prompt with administrator privileges. Initiate the SFC scan by entering the command: «sfc /scannow» and press enter. This command begins a thorough system scan, identifying any corrupted files. If discovered, the SFC tool will automatically attempt to fix them.
Once the SFC scan completes, it’s time to utilize the DISM tool. Type in: «DISM /Online /Cleanup-Image /RestoreHealth» and press enter. This command works to restore potentially damaged system images. Note that this process may require some time to fully execute.
Following the completion of both commands, reboot your computer. This restart allows your system to incorporate the changes and repairs made, potentially resolving the «Windows Script Host» error.
Command Prompt: System File Checker
-
The «Windows Script Host» error, often accompanied by the message «Can Not Find Script File,» is a common issue experienced by Windows users. It typically arises when the system fails to locate or execute a specific script file.
-
Autoruns is a utility developed by Microsoft that lets you manage startup items. You can download it from the Microsoft website, and after installation, locate and disable any entries related to vbs files under the «Logon» tab. This can help resolve the «Windows Script Host» error.
-
The Registry Editor is a powerful tool that allows you to modify system files. To fix the «Windows Script Host» error, you can change the value data of certain keys under specific paths. It is essential to follow the correct steps and exercise caution while using the Registry Editor.
-
The System File Checker (SFC) is a built-in Windows tool that scans and repairs corrupted system files. By running an SFC scan using the command «sfc /scannow» in the Command Prompt, you can potentially fix the «Windows Script Host» error.
-
DISM stands for Deployment Image Servicing and Management. It is a Windows tool used to fix Windows corruption errors. Running the DISM command «DISM /Online /Cleanup-Image /RestoreHealth» in the Command Prompt checks the system for corruption and attempts to repair it, thereby potentially resolving the «Windows Script Host» error.
Все способы:
- Способ 1: Проверка пути к файлу сценария
- Способ 2: Проверка и удаление задачи из Планировщика заданий
- Способ 3: Восстановление или создание файла task.vbs
- Способ 4: Проверка и восстановление компонента Windows Script Host
- Способ 5: Восстановление регистрации файлов .vbs
- Способ 6: Проверка на вредоносное ПО
- Способ 7: Использование средства проверки системных файлов
- Способ 8: Создание нового сценария с аналогичной функциональностью
- Решение проблем с конкретными программами
- Использование альтернативных средств автоматизации
- Автоматизация задач через Планировщик заданий
- Создание командных файлов BAT и CMD
- Разработка PowerShell-скриптов
- Вопросы и ответы: 0
Ошибка «Не удается найти файл сценария task.vbs» возникает в операционной системе Windows при попытке выполнения определенных системных задач или запланированных действий. Файлы с расширением .vbs являются сценариями Visual Basic Script, которые используются для автоматизации различных процессов в Windows. Сценарий task.vbs обычно применяется для управления планировщиком заданий, создания автоматических резервных копий, выполнения системных операций и других административных задач.
Проблема чаще всего возникает при запуске сценариев из ярлыков, при автоматическом выполнении задач по расписанию или при попытке открытия определенных программ и утилит, зависящих от данного файла. Причины ошибки могут быть разнообразными: от неправильного пути к файлу или его отсутствия до повреждения системных компонентов Windows, ответственных за выполнение VBS-сценариев.
Способ 1: Проверка пути к файлу сценария
Самой распространенной причиной ошибки «Не удается найти файл сценария task.vbs» является неправильно указанный путь к файлу или его фактическое отсутствие в указанном месте. В этом случае решение заключается в проверке и исправлении пути к файлу в ярлыке или команде, которая пытается его запустить. Перемещение файлов, изменение структуры папок или случайное удаление могут привести к тому, что система больше не может найти нужный сценарий по указанному пути.
- Щелкните правой кнопкой мыши на ярлыке или элементе, вызывающем ошибку, и выберите пункт «Свойства».
- В открывшемся окне свойств найдите поле «Объект», в котором указан путь к выполняемому файлу или команде.
- Внимательно проверьте указанный путь. Он должен содержать полный путь к файлу task.vbs, например:
C:\Windows\System32\task.vbs
илиC:\Scripts\task.vbs
. - Убедитесь, что файл действительно существует по указанному пути. Для этого откройте «Проводник» и перейдите к указанной в пути директории.
- Если файл отсутствует в указанном месте, но вы знаете его правильное расположение, исправьте путь в поле «Объект» и нажмите «OK».
- Если вы не знаете правильный путь к файлу, воспользуйтесь поиском в Windows. Нажмите клавиши Win + S, введите
task.vbs
и посмотрите результаты поиска. - После обнаружения файла скопируйте его полный путь (щелкните правой кнопкой мыши на файле, удерживая клавишу Shift, и выберите «Копировать как путь») и вставьте его в поле «Объект» в свойствах ярлыка.
Способ 2: Проверка и удаление задачи из Планировщика заданий
Очень часто ошибка «Не удается найти файл сценария task.vbs» возникает при автоматическом запуске запланированной задачи, которая пытается обратиться к уже удаленному или перемещенному файлу сценария. Планировщик заданий Windows продолжает выполнять настроенные ранее задачи по расписанию, даже если файлы, на которые они ссылаются, больше не существуют. В этом случае самым эффективным решением будет просто найти и удалить или изменить соответствующую задачу в Планировщике заданий.
- Откройте «Планировщик заданий» Windows. Для этого нажмите клавиши Win + R, введите
taskschd.msc
и нажмите Enter. - В открывшемся окне «Планировщика заданий» просмотрите список всех активных задач. Обратите особое внимание на задачи в папках «Библиотека планировщика заданий» — «Microsoft» — «Windows», а также на задачи в корневой библиотеке.
- Для каждой подозрительной задачи проверьте ее свойства, дважды щелкнув на ней или выбрав ее и нажав «Свойства» в правой панели.
- На вкладке «Действия» просмотрите действия, которые выполняет задача. Ищите действия, связанные с запуском файла task.vbs или других VBS-скриптов.
- Если вы нашли задачу, которая пытается запустить несуществующий файл task.vbs, у вас есть несколько вариантов:
- Отключить задачу: выберите задачу и нажмите «Отключить» в правой панели.
- Удалить задачу: выберите задачу и нажмите «Удалить» в правой панели.
- Изменить задачу: откройте свойства задачи, перейдите на вкладку «Действия», выберите действие и нажмите «Изменить», чтобы указать правильный путь к файлу или изменить выполняемое действие.
- После внесения изменений нажмите «OK» для сохранения изменений.
- Перезагрузите компьютер, чтобы убедиться, что ошибка больше не появляется.
Способ 3: Восстановление или создание файла task.vbs
Если файл task.vbs был удален или поврежден, можно восстановить его путем копирования из другого компьютера с аналогичной версией Windows или создать новый файл с необходимым содержимым. Это особенно полезно, если вы точно знаете, какие команды должен выполнять сценарий, или имеете резервную копию оригинального файла.
- Откройте «Блокнот» или другой текстовый редактор. Для этого нажмите клавиши Win + R, введите
notepad
и нажмите Enter. - Скопируйте и вставьте код сценария task.vbs. Если у вас нет оригинального кода, но вы знаете, какую задачу должен выполнять сценарий, вы можете найти примеры VBS-скриптов в интернете или использовать общий шаблон для базовых функций. Пример базового кода для task.vbs, который запускает планировщик заданий:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "taskschd.msc", 1
- Выберите в меню «Файл» пункт «Сохранить как».
- В открывшемся диалоговом окне перейдите в папку, где должен находиться файл task.vbs (обычно это
C:\Windows\System32\
или другая директория, указанная в ярлыке или команде). В поле «Имя файла» введите task.vbs, а в поле «Тип файла» выберите «Все файлы (*.*)». - В поле «Кодировка» выберите «ANSI» или «UTF-8». Нажмите кнопку «Сохранить».
Способ 4: Проверка и восстановление компонента Windows Script Host
Ошибка «Не удается найти файл сценария task.vbs» также может возникать из-за проблем с компонентом Windows Script Host (WSH), который отвечает за выполнение скриптов в Windows. Если WSH отключен, поврежден или неправильно настроен, выполнение VBS-сценариев становится невозможным. Восстановление этого компонента может решить проблему.
- Откройте «Редактор реестра». Проще всего это сделать через поиск в «Пуске».
- В открывшемся окне перейдите по следующему пути
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings
. - В правой панели найдите параметр «Enabled». Если его значение равно 0, это означает, что Windows Script Host отключен.
- Дважды щелкните на параметре «Enabled», установите значение 1 и нажмите «OK».
- Если параметра «Enabled» нет, щелкните правой кнопкой мыши в правой панели, выберите «Создать» > «Параметр DWORD (32 бита)», назовите его «Enabled» и установите значение 1.
- Закройте «Редактор реестра» и перезагрузите компьютер.
Способ 5: Восстановление регистрации файлов .vbs
Иногда проблема может быть связана с неправильной регистрацией файлов с расширением .vbs в системе. Это может произойти после установки стороннего программного обеспечения, в результате действия вирусов или из-за случайного изменения ассоциаций файлов. Восстановление правильной регистрации может решить проблему.
- Откройте «Командную строку» от имени администратора. Отыщите консоль через «Пуск» и выберите соответствующий пункт.
- В открывшемся окне введите следующую команду для сброса регистрации файлов .vbs
assoc .vbs=VBSFile
- Нажмите Enter, а затем введите еще одну команду для правильной привязки обработчика
ftype VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %*
- Если вы предпочитаете использовать CScript вместо WScript, введите
ftype VBSFile="%SystemRoot%\System32\CScript.exe" "%1" %*
- Нажмите Enter после каждой команды и закройте «Командную строку».
- Перезагрузите компьютер и попробуйте запустить сценарий task.vbs снова.
Способ 6: Проверка на вредоносное ПО
Некоторые вредоносные программы могут целенаправленно блокировать или изменять функциональность Windows Script Host для предотвращения запуска определенных скриптов или для маскировки своей активности. Проверка системы на наличие вирусов и вредоносного ПО может помочь решить проблему с запуском файла task.vbs. Вы можете запустить сканирование как при помощи встроенного средства «Защитника Windows», если ранее не использовали его, или установить отдельную антивирусную защиту. Больше информации об этом вы найдете в другой статье на нашем сайте по ссылке ниже.
Подробнее: Борьба с компьютерными вирусами
Способ 7: Использование средства проверки системных файлов
Если ошибка вызвана повреждением системных файлов Windows, связанных с выполнением скриптов, можно воспользоваться встроенными инструментами восстановления системы. Средство проверки системных файлов (SFC) и средство восстановления образа системы (DISM) могут помочь восстановить поврежденные файлы. Сначала стоит начать с первой утилиты и посмотреть, удастся ли ей найти какие-то проблемы и исправить их. В случае необходимости переходите к DISM, задав необходимые аргументы. Обо всем этом можете прочитать в материале, кликнув по следующему заголовку.
Подробнее: Проверка целостности системных файлов Windows 11
Способ 8: Создание нового сценария с аналогичной функциональностью
Если все вышеперечисленные способы не помогли решить проблему, можно создать новый сценарий с аналогичной функциональностью, но с другим именем файла или использовать альтернативные средства для выполнения тех же задач. Это особенно полезно, если вам известно, какие именно функции должен выполнять сценарий task.vbs.
- Определите назначение оригинального сценария task.vbs. Если у вас нет доступа к его содержимому, попробуйте вспомнить, при выполнении каких действий возникает ошибка, или проанализируйте ярлыки и задачи, которые пытаются запустить этот сценарий.
- Откройте «Блокнот» и создайте новый сценарий, который выполняет те же функции. Например, если сценарий должен запускать определенную программу или утилиту, вы можете создать следующий код:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "путь_к_программе_или_команде", 1
- Сохраните файл с новым именем, например
new_task.vbs
, в удобном для вас месте. - Измените все ярлыки и запланированные задачи, которые использовали оригинальный сценарий task.vbs, указав в них путь к новому файлу.
- Если сценарий выполнял сложные функции, возможно, потребуется изучить основы языка VBScript или обратиться к специалисту для создания нового сценария с аналогичной функциональностью.
Решение проблем с конкретными программами
Некоторые программы могут создавать собственные VBS-сценарии с именем task.vbs для выполнения определенных задач. В этом случае ошибка может быть специфичной для конкретного программного обеспечения. Рассмотрим несколько примеров:
- Антивирусное ПО. Некоторые антивирусные программы используют VBS-сценарии для выполнения сканирования по расписанию или других задач. Если ошибка связана с антивирусом, попробуйте переустановить программу или обратиться в службу поддержки разработчика.
- Программы резервного копирования. Средства резервного копирования часто используют сценарии для автоматизации процесса создания резервных копий. Если ошибка возникает при выполнении резервного копирования, проверьте настройки программы и убедитесь, что все необходимые компоненты установлены правильно.
- Системы управления документами. В корпоративных системах управления документами могут использоваться VBS-сценарии для обработки файлов и интеграции с другими системами. При возникновении ошибок обратитесь к администратору системы для получения специфических решений.
- Программное обеспечение для бизнеса. Многие бизнес-приложения используют VBS-сценарии для автоматизации рутинных задач. В случае ошибок с такими сценариями рекомендуется обратиться к документации программы или в службу поддержки разработчика.
Читайте также: Удаление антивируса с компьютера
Читайте также:
Как сделать резервную копию в Windows 11
Программы для резервного копирования
Использование альтернативных средств автоматизации
Если восстановить работу сценария task.vbs не удается, можно рассмотреть возможность использования альтернативных средств автоматизации, доступных в Windows. В зависимости от задачи, которую выполнял оригинальный сценарий, существуют различные инструменты и подходы, которые могут полностью заменить функциональность VBS-скриптов. Ниже рассмотрены наиболее эффективные альтернативы, которые подойдут для разных сценариев использования.
Автоматизация задач через Планировщик заданий
Встроенный «Планировщик заданий» Windows представляет собой мощный инструмент для автоматизации практически любых действий в системе. Он позволяет запускать программы, скрипты и команды по расписанию или при наступлении определенных событий, таких как вход пользователя в систему, запуск компьютера или подключение к сети. Планировщик имеет удобный графический интерфейс и не требует знания скриптовых языков.
- Откройте «Планировщик заданий» через меню «Пуск» или выполнив команду
taskschd.msc
в диалоговом окне «Выполнить» (Win + R). - В главном окне «Планировщика заданий» выберите «Создать задачу» в правой панели «Действия».
- На вкладке «Общие» введите имя и описание задачи, выберите учетную запись, от имени которой будет выполняться задача, и настройте параметры безопасности.
- На вкладке «Триггеры» нажмите кнопку «Создать» и настройте условия запуска задачи: по расписанию, при входе в систему, при запуске компьютера или при наступлении другого события.
- На вкладке «Действия» нажмите кнопку «Создать» и выберите тип действия: запуск программы, отправка электронной почты или отображение сообщения. Для запуска программы укажите путь к исполняемому файлу и необходимые аргументы.
- На вкладках «Условия» и «Параметры» настройте дополнительные условия выполнения и поведение задачи при сбоях.
- Нажмите «OK» для сохранения задачи. Она будет выполняться автоматически при наступлении указанных условий.
Создание командных файлов BAT и CMD
Командные файлы (batch files) с расширениями .bat или .cmd являются простым и полезным средством автоматизации в Windows. Они позволяют выполнять последовательности команд «Командной строки» и могут заменить многие функции VBS-скриптов. Командные файлы не требуют установки дополнительного программного обеспечения и поддерживаются всеми версиями Windows. Они особенно удобны для простых задач, таких как запуск программ, копирование файлов или выполнение системных операций.
- Откройте «Блокнот» или любой другой текстовый редактор.
- Введите необходимые команды. Например, для запуска программы и ожидания ее завершения можно использовать:
@echo off
start /wait "Название программы" "C:\Путь\к\программе.exe"
echo Программа завершила работу
pause
- Для выполнения нескольких команд последовательно просто добавьте их в файл, каждую с новой строки:
@echo off
echo Начало выполнения операций
cd /d "C:\Путь\к\папке"
mkdir Backup
copy "C:\Источник\*.txt" "C:\Путь\к\папке\Backup\"
echo Операции завершены
pause
- Сохраните файл с расширением .bat или .cmd. Для этого выберите в меню «Файл» пункт «Сохранить как», введите имя файла с нужным расширением (например,
my_script.bat
) и в поле «Тип файла» выберите «Все файлы (*.*)». - Для запуска созданного командного файла просто дважды щелкните на нем в «Проводнике» или создайте для него ярлык, который можно будет использовать вместо сценария task.vbs.
Разработка PowerShell-скриптов
PowerShell представляет собой современную и мощную среду для автоматизации задач в Windows, предлагающую гораздо более широкие возможности по сравнению с VBScript. PowerShell объединяет возможности командной строки и объектно-ориентированного языка программирования, что позволяет создавать скрипты для решения практически любых задач администрирования и автоматизации. PowerShell предустановлен на всех современных версиях Windows, начиная с Windows 7 и Windows Server 2008 R2.
- Откройте «Windows PowerShell ISE» (удобная среда разработки для PowerShell с подсветкой синтаксиса и автодополнением) через меню «Пуск» или выполнив команду
powershell_ise
в диалоговом окне «Выполнить». - Создайте новый скрипт, нажав комбинацию клавиш Ctrl + N или выбрав пункт «Новый» в меню «Файл».
- Напишите код скрипта. Ниже приведены примеры для типичных задач:
Для запуска программы:
# Запуск программы и ожидание ее завершения
Start-Process -FilePath "C:\Путь\к\программе.exe" -Wait
Write-Host "Программа завершила работу"
Для работы с файлами:
# Копирование файлов с определенным расширением
$sourceFolder = "C:\Источник"
$destinationFolder = "C:\Назначение"
New-Item -Path $destinationFolder -ItemType Directory -Force
Get-ChildItem -Path $sourceFolder -Filter "*.txt" | Copy-Item -Destination $destinationFolder
Write-Host "Копирование завершено"
Для работы с реестром:
# Изменение значения в реестре
$registryPath = "HKLM:\SOFTWARE\MyApp"
$name = "Setting"
$value = "NewValue"
if (!(Test-Path $registryPath)) {
New-Item -Path $registryPath -Force
}
Set-ItemProperty -Path $registryPath -Name $name -Value $value
Write-Host "Реестр обновлен"
- Сохраните скрипт с расширением .ps1, выбрав в меню «Файл» пункт «Сохранить» или «Сохранить как» и указав имя файла с расширением .ps1.
- Для запуска скрипта из «Проводника» потребуется изменить политику выполнения PowerShell или создать командный файл (.bat), который будет запускать скрипт с обходом политики. Пример содержимого такого файла:
@echo off
powershell -ExecutionPolicy Bypass -File "C:\Путь\к\скрипту.ps1"
pause
Наша группа в TelegramПолезные советы и помощь
Do you come across error messages popping up frequently saying that Windows Script Host can not find script file loader.vbs? Loader.vbs refers to a specific VBScript that offers an ideal environment for running scripting languages. Such components allow users to automate tasks as well as perform various operations using scripts written in scripting languages like VBScript and JScript. WSH provides a runtime engine along with a set of objects and methods that can be accessed through scripts. While using WSH many users experience issues with the execution of a VBScript file named Loader.vbs. This kind of blunder is often mistaken for malware, but it is nothing more than a stop code with the VBScript file.
Windows Script Host Loader.vbs Error in Windows 11 or 10 appears with all versions of the operating system, and no specific reason or software is yet identified as the culprit. The issue is mostly system-related and usually indicates malware infection. Besides virus invasion, the error can be triggered by incorrect script syntax, damaged VBS script files, wrong registry values, and corrupted system components. Security restrictions often bring up similar issues too. See: How to Fix Autoit Error Line 0 in Windows 11 or 10 (Solved!).
Windows Script Host Loader.vbs Error
Here is how to Fix Windows Script Host Loader.vbs Error in Windows 11 or 10 –
Method-1: Create a Loader.vbs file manually (Trick)
Sometimes a small trick may help solve the error message popping up frequently on your computer. All you need to do is to go to the path displayed in the message, create a file, and name it Loader.vbs. Follow the instructions:
- Because I am facing the error message Windows Script Host Can not find script file “C:\Users\Public\IObitunlocker\Loader.vbs”, I will navigate to C:\Users\Public\IObitunlocker. In the same way, go to the path on your computer where the Loader.vbs is not found.
- Right click in the folder and select New > Text Document.
- Rename the New Text Document.txt file to Loader.vbs.
- Restart the system.
Method-2: Use Autorun to delete the files
Autorun automatically executes a program or script when certain events occur, furthermore, determines what action should be taken when a removable media device is inserted into a computer. It doesn’t directly address script errors within a specific VBS file.
Surprisingly, using Autorun is often found useful to resolve Windows Script Host Loader.vbs error. However, there might be times when the utility alone fails to directly fix the issue and you’ll need to diagnose and troubleshoot the script itself.
- Download Autorun for Windows.
- Go to the directory where downloaded files are saved.
- Right-click on Autoruns.zip and select Extract all.
- Double-click unzipped Autoruns folder.
- Right-click Autoruns64.exe and choose Run as administrator. If you are running a 32-bit system, opt for Autoruns.exe.
- In the appearing User Account Control, click Yes.
- Once on the next prompt, click agree.
- When the dedicated window shows up, click Options from the menu bar.
- Make sure both options Hide Microsoft Entries and Hide Windows Entries are unchecked.
- Check Hide Empty Locations.
- Now, click on Quick filter and type loader.vbs.
- Right-click on any found entries and choose Delete.
- Reboot your computer.
Method-3: Scan full system for malware
In some cases, Loader.vbs Error may be caused by malware or viruses affecting the WSH script execution. Therefore, the first thing to do is perform a thorough scan of your system using an updated antivirus or antimalware software.
Since Windows Security provides the needed service, we encourage using this built-in utility over any third-party one.
- Click on Start.
- Type “Windows Security”.
- Hit Enter.
- In the Windows Security app, choose Virus & threat protection.
- From right-hand side, click the link Scan options.
- Select the radio button set before Full scan.
- Finally, Click Scan now.
- The process may take some time to complete, meanwhile, you can monitor the progress within the Windows Security interface.
- Once the scan is finished, the utility will display the results.
- If any threats are detected, remove them.
- Close Windows Security and then restart the machine.
If the aforementioned issue happens afterward, there is a chance that the antivirus has cleaned the virus but left the entry to trigger the .vbs file intact. Therefore, try below troubleshooting methods to fix Loader.vbs error. Furthermore, In this case, Malwarebytes, McAfee, and Bitdefender can also be used to remove threats and fix Loader.vbs.
Method-4: Enable Windows Script Host
Loader.vbs error in Windows 11 or 10 may rise up if Script Host gets disabled somehow. If so, you won’t be able to run scripts using WSH and end up encountering issues plus restrictions. To resolve such problems, here’s how you can enable the Script Host via the Registry Editor –
- Press Windows + R.
- In Run dialog box, type in regedit.
- Click OK.
- Allow the appearing UAC by clicking Yes.
- When Registry Editor opens, navigate to
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Script Host\Settings
- Double-click the Enabled value on the right-hand side pane.
Note – If you can’t find the Enabled value, you will have to create one. For that, right-click on an empty space on the right-hand side pane and select New => DWORD (32-bit) Value. Name this new value as Enabled.
- Put 1 in the Value data box.
- Click OK.
Method-5: Modify the value of .VBS key
In Windows Registry, there is a specific key related to .VBS extension that defines how Windows handles these particular files. If you’re looking to correct the behavior of .VBS files or troubleshoot any issues related to their execution such as Windows Script Host Loader.vbs error, make sure its registry value is set correctly.
- Press Windows and S keys on the keyboard.
- Type in regedit.exe.
- Hit Enter key.
- When UAC prompts for your consent, click Yes.
- In the Registry Editor, navigate
HKEY_CLASSES_ROOT\.vbs
folder in the left navigation pane. - From right pane, right-click the key named Default.
- Choose Modify.
- Make sure the Value data is VBSFile.
- Click OK.
- Close Registry Editor.
- Reboot your PC to let changes take effect.
Method-6: Delete entries after Userinit.exe
Userinit.exe is responsible for initializing user environment during the Windows login process. When a user logs in, this executable file is executed to load various components and settings, such as the user profile, startup programs, and network connections.
Entries that are executed after Userinit.exe during startup process, often trigger Windows Script Host Loader.vbs error in Windows 11 or 10. Therefore, delete those entries and see if it resolves the issue.
- Open Registry Editor.
- Go to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- In the right pane, remove all the entries present after Userinit. They are often VMApplet and WinStationsDisabled.
- Simply, right-click on VMApplet and choose Delete.
- In the same way, delete WinStationsDisabled too.
- Now, double-click Userinit.
- Check whether the Value data is set as C:\Windows\system32\userinit.exe.
- Click OK.
- Close Registry Editor.
- Restart Windows to make the changes effective.
Method-7: Run Microsoft Safety Scanner
Safety Scanner is a free, on-demand tool provided by Microsoft to help scan, detect, and eradicate potential malware from your computer. This process is slightly different from the scan we performed with Windows security.
Since the earlier malware scans didn’t solve Windows Script Host Loader.vbs error, trying out every plausible troubleshooting step is recommended.
- Download the latest and legitimate version of Microsoft Safety Scanner directly from the official Microsoft website.
- Once completed, go to the directory where system saves downloaded items.
- Double-click the setup file.
- When license terms window appears, click Accept to proceed.
- Select Full Scan.
- Click Next.
- Now, the utility will scan your entire computer thoroughly.
- Once the scan is complete, Microsoft Safety Scanner will display a report with the results. It will list any detected malware or suspicious files.
- Follow the instructions to remove any identified threats.
This utility is not a replacement for antivirus software and that’s why don’t expect real-time protection from it. For ongoing protection, always use a reliable antivirus program and keep it updated.
Method-8: Troubleshoot corrupted system files
Corrupted and misplaced system files can cause several issues on a Windows computer including “Loader.vbs” error. The pre-built System File Checker (SFC) tool is extremely useful to deal with such problems.
Once run in the elevated Command Prompt, it scans the full system for any misconfiguration and repairs as well. Here’s how you can run the SFC tool –
- Press Windows and R keys.
- Type cmd.exe.
- Then, press Ctrl + Shift + Enter.
- To allow User Account Control, click Yes.
- In the elevated Command Prompt window, type
sfc /scannow
. - Hit Enter.
- Doing so will instruct the SFC tool to scan for and repair any corrupted system files.
- Once the scan and repair process is complete, you will see a message indicating the results. It will inform you if any corrupted files were found and repaired successfully or if any issues couldn’t be resolved.
- After the process is finished, restart your computer.
Method-9: Update Windows Script Host
WSH is typically updated along with the regular Windows updates provided by Microsoft. It’s important to keep your Windows up to date to ensure you have the latest security patches, bug fixes, and new features. This also helps to maintain the stability and security of your system.
Windows 11
- Press Windows + I.
- From left column of Settings app, select Windows Update.
- Move to the right and then click “Check for updates”.
- The system will start checking for latest updates over internet.
- Once found, it will be displayed in the same settings window.
- Click Download button first. If the system asks, click Install too.
- Now, Windows will download and install the updates automatically. This process may take some time, depending on the size and number of updates.
- Once the updates are installed, Windows will prompt you to reboot your computer. Click Restart now button to finish the process.
Windows 10
- Open the Settings app by pressing Windows key + I.
- Select Update & Security.
- Click Check for updates button present in right pane.
- The next procedures are the same as Windows 11 we mentioned above.
Method-10: Restore Windows
Restoring Windows is a process of reverting your computer’s OS and settings to a previous point in time and is helpful if you started getting Windows Script Host Loader.vbs Error. While going back to an earlier state won’t affect your personal files, it may revert any recent change you made including installing programs and drivers. Therefore, it’s recommended to back up your important files before proceeding.
- Press Windows key.
- Type System Restore.
- Press Enter key to open System Properties wizard.
- Click System Restore button.
- In the System Restore wizard, click on the Next button to proceed.
- You’ll see a list of available restore points. Select one that you believe was created before Loader.vbs Error started occurring.
- You can also check Show more restore points option to see additional points.
- Click Scan for affected programs button to see a list of programs and drivers that will be affected by this process.
- If everything seems okay, click on Next.
- Finally, hit Finish button.
- Your computer will restart now, and the restore process will begin.
- Wait for the system restore to complete. The computer will restart time and again, and Windows will be restored to the selected point.
Method-11: Perform in-place upgrade
Performing an in-place upgrade is a process of reinstalling Windows while keeping your files, applications, and settings intact. This can help resolve issues or errors by essentially replacing the existing installation of Windows with a fresh copy. Here’s how you can perform an in-place upgrade in Windows:
- Go to the official Microsoft website and download Media Creation Tool. This tool allows you to create a bootable USB drive or an ISO file to perform the in-place upgrade.
- Once you have the installation media, insert the USB drive or mount the ISO file.
- Press Windows + E to open File Explorer.
- Navigate to the installation media.
- Double-click the setup.exe file to initiate the process.
- In the Windows Setup window, select Upgrade this PC now and click on the Next button.
- The setup will check for updates and prepare for the upgrade process. Follow the on-screen instructions and make any selections or adjustments as needed.
- Accept the license terms and then click Next.
- The setup will check your system compatibility. If there are any issues or warnings, address them accordingly. If your system meets the requirements, click on Next.
- Choose the option to keep your personal files, applications, and settings. This ensures that your data and installed programs are preserved during the upgrade.
- Click Install button to begin the upgrade process.
- Windows will start the installation process. The function may take some time, and your computer may restart several times.
- To complete in-place upgrade, keep following the on-screen instructions. Windows will guide you through the final steps, including setting up your user account and privacy settings.
Once the upgrade process is complete, check for Windows update manually. Reinstall any necessary drivers or applications to ensure everything is up to date.
Method:
Method-1: Create a Loader.vbs file manually (Trick)
Method-2: Use Autorun to delete the files
Method-3: Scan full system for malware
Method-4: Enable Windows Script Host
Method-5: Modify the value of .VBS key
Method-6: Delete entries after Userinit.exe
Method-7: Run Microsoft Safety Scanner
Method-8: Troubleshoot corrupted system files
Method-9: Update Windows Script Host
Method-10: Restore Windows
Method-11: Perform in-place upgrade
That’s all!!
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.
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.
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.
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.
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.
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.
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.
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.
Step 4: Choose Open System Restore and select a restore point in the pop-up window.
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].
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?
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:
- Type Windows Security in the Windows search bar and select the Best match.
- In the next window, select Virus & threat protection.
- Next, select Scan options and then choose Full scan from the options that appear.
- Finally, press the Scan now button.
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:
- Press Win + R to open the Run command dialog box.
- Type Regedit and press OK to open the Registry Editor.
- Navigate to Computer > HKEY_CLASSES_ROOT > .vbs.
- Double-click the (Default) value on the right-hand side pane to open it.
In the next window, set the Value data to VBSfile and then press OK to save these settings.
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:
- Press Win + R to open the Run command dialog box.
- Type CMD and press Ctrl + Shift + Enter to open an elevated Command Prompt.
-
Next, type the following command and then press Enter:
DISM /Online /Cleanup-Image /ScanHealth
-
Wait for the scan to complete. From there, type the following command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
- When the scan is complete, restart your PC to apply these changes.
-
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
- When the scan is complete, close the Command Prompt and restart your PC
4. Use the Microsoft Safety Scanner
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:
- Depending on your system specs, download either the 32- or 64-bit version of the Microsoft Safety Scanner.
- Once installed, open the program and select the type of scan you want to run.
- Click Next to continue and follow the on-screen instructions to finalize the process.
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:
- Type Control Panel in the Windows search bar and select the Best match.
- Click the View by drop-down menu and select Large icons.
- Scroll down and click the Recovery option.
- In the next window, click the Open System Restore option and then click Next in the pop-up window.
- In the System Restore window, select a restore point and then click Next to continue.
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:
- Press Win + R to open the Run command dialog box.
- Type Regedit and press OK to open the Registry Editor.
- Navigate to HKEY_CURRENT_USER > Software > Microsoft > Windows Script Host > Settings.
Double-click the Enabled value on the right-hand side pane and then set its Value data to 1.
If you can’t find the Enabled value, create it by following these steps:
- Right-click on an empty space on the right-hand side pane and select New > DWORD (32-bit) Value.
- Name this new value as Enabled and then click OK.
- 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.