Fix Windows script host “run.vbs” error in Windows 11

Methods to solve Windows script host C:\Windows\run.vbs error code 80070002 The system cannot find the file specified in Windows 11.

Windows script host run.vbs

Do you have a Windows Script Host problem with the illusive ‘Run.vbs’ file on your Windows 11 system? This mysterious error message, which is frequently accompanied by the message, “The system cannot find the file specified” declaration and error code 80070002, appears during system boot-up, program launches, shutdowns, or even at random intervals throughout system operation. While it may appear to be a simple lost file or virus attack, the underlying reason is frequently more complex.

The Windows Script Host utility, essential for system automation and administration, primarily supports VBS, VBE (VBScript), and JS/JSE (JScript) files. Run.vbs file is hidden under the AppData folder. However, because this script isn’t related to any single application, it’s difficult to pinpoint the problem. See: Fix Windows Script Host “Loader.vbs” Error (Solved!).

Windows script host run.vbs error in Windows 11

Here is how to fix Windows script host run.vbs error in Windows 11:

Leverage Autoruns to Turn Off Residual Processes

Autoruns is a potent tool from Microsoft that proves invaluable in confronting Windows Script Host Run.vbs errors on your Windows 11. However, it’s not pre-installed, obtaining it is straightforward. To harness the full potential of Autoruns in resolving this issue, follow these steps:

  1. Download Autoruns for Windows from the official website.
  2. Locate the downloaded ZIP file in your designated folder.
  3. Right-click on the ZIP file and choose Extract all.
  4. Then, access the resulting folder.
  5. Right-click on the appropriate EXE file and select Run as administrator.
  6. In the User Account Control (UAC) window, click Yes.
  7. Type VBS in the filter box and press Enter.
  8. Identify red-marked entries among the search results.
  9. Right-click the red entries (e.g., \Windows Update) and either select Delete or click the trash can icon.
  10.  Restart your PC.

Run SFC Scan and DISM Commands

Another easy way to resolve the run.vbs error is to run an SFC (System File Checker) scan and alongwith it employ DISM (Deployment Imaging Service and Management Tool) commands which will tackle this error head-on. Check out the steps mentioned below:

  1. Press Windows keys and type cmd.
  2. Select Run as administrator.
  3. When User Account Control asks for permission, select Yes.
  4. Type the below command and press Enter

SFC /SCANNOW

  1. Wait for completion.
  2. Execute the following command lines sequentially.
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
how to fix Windows script host run.vbs error in Windows 11
  1. Wait for the process to finish.
  2. Restart your PC.

Turn Off Windows Script Host

If you are still perplexed and unable to address this error on your Windows 11, a practical approach will be to disable Windows Script Host itself. This not only safeguards your system against HTML malware but also eliminates bothersome startup errors. Accessing the Registry Editor as an Administrator is the key to achieving this. Follow these steps:

  1. Type regedit in Windows search and press Enter.
  2. Click Yes in the User Account Control prompt.
  3. Navigate to the specified Registry location:
HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings\
Turn Off Windows Script Host through Registry Editor
  1. If the Enabled key isn’t present, create it.
  2. For this, right-click a space in the right window.
  3. Select “New > DWORD (32-bit) Value.” Note: Whether your computer is 64-bit, create 32-bit value.
  4. Double-click the value and set its data to 0.
  5. Go to the next Registry location and repeat the above steps.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings\
fix Windows script host run.vbs error in Windows 11

Perform a Security Software System Scan

To effectively tackle the run.vbs error in your system, a crucial step involves scanning your system with reliable security software. Malicious programs can be persistent, causing recurring errors like the AppData\Local\Updates\Run.vbs issue.

While third-party anti-malware tools are an option, Microsoft Defender stands out for its commendable malware detection and removal capabilities. For a comprehensive scan, consider running the Microsoft Defender Offline scan, ensuring your system remains error-free.

  1. Click Start and type Windows security.
  2. Hit Enter.
  3. Select Virus & threat Protection.
  4. Then click on Scan options.
  5. Choose Microsoft Defender Antivirus (offline scan).
  6. Click Scan now.
Perform a Security Software System Scan Microsoft Defender Antivirus offline scan
  1. Your PC will restart, initiating the scan.

Stop the File from Loading at Startup

Preventing the file in question from loading at boot time is a quick and easy fix for the aforementioned error. If you follow these instructions, you should be able to fix your system and ensure that it will no longer encounter this issue.

  1. Open Task Manager by pressing Ctrl + Shift + Esc.
  2. In the Startup tab, find run.vbs, select it, and click Disable.
  3. Restart your PC to check if the error is resolved.

Edit the Script

Making slight adjustments in the script can effectively eliminate this error and ensure your Windows 11 system runs smoothly. The steps to be followed are mentioned below:

  1. Open File Explorer with Windows + E.
  2. Navigate to the error message path.
  3. Right-click run.vbs, and choose Open with > Notepad.
  4. Delete all content.
  5. Type/paste Wscript.Quit, then Ctrl + S to save.
  6. Restart your computer to confirm the fix.

Run System Restore

Familiar with System Restore? It can roll back our system to a previous state, eliminating the concerned run.vbs error and restoring the normal operation within your Windows 11. The steps are as follows:

  1. Press Win + R, then type control and press Enter.
  2. Select Large icons in the View by option.
  3. Choose Recovery.
  4. Click Open System Restore.
  5. Click Next.
  6. Select a Restore point at the time when the error did not start occurring then click on Next.
Windows script host run.vbs error
  1. On the coming wizard, click on Finish.
  2. Once a warning popup appears, click on Yes.
  3. Wait patiently as it will take a lot of time.

Enter Safe Mode To Delete Startup.vbs

Last but not least, another potential way to resolve this error is by booting into Safe Mode and removing the startup.vbs file could be your answer. This easy-to-follow guide will show you how this simple step can resolve the error.

Restart the System in Safe Mode

  1. Click on Search and type MSConfig.
  2. Press “Enter” and launch the System Configuration window.
  3. Go to the Boot tab.
  4. Check Safe boot > Minimal.
  5. Click on Apply and OK.
Enter Safe Mode To Delete Startup.vbs
  1. Select Restart.

Find and delete the key associated with the startup.vbs

  1. Right-click the Windows from the taskbar and choose Run.
  2. Type regedit and click OK.
  3. In Registry Editor, click Edit > Find.
  4. Search for startup.vbs.
  5. Double-click the Userinit key.
  6. Delete startup.vbs from the right panel.
  7. Click OK to save.
  8. In our case, the value data of the particular key is:

C:\Windows\system32\userinit.exe, C:\Windows\startup.vbs

  1. Press F3 to find the next key.
  2. Repeat the steps for all startup.vbs” keys.

Delete the startup.vbs file using File Explorer

  1. Open File Explorer (Win+E).
  2. Navigate to the noted startup.vbs location.
  3. In our case, it is in C:\Windows folder.
  4. Find the file.
  5. Right-click and select Delete.
  6. Close File Explorer.
  7. Restart your computer.

Bring In-place Upgrade in use

Another potential way to clear out the Windows Script Host run.vbs error is through an in-place upgrade. This method involves reinstalling the operating system while preserving your files and applications, effectively addressing the error, and restoring your system’s functionality. Follow these steps:

  1. Navigate to the official website to download the disk image file of Windows 11.
  2. Go to the bottom part of the page where the Heading Download Windows 11 Disk Image (ISO) for x64 devices is located.
  3. Click on the drop-down that states:  “Select Download
  4. Click on “Windows 11 (multi-edition ISO for x64 devices)“.
  5. Select the button Download Now.
  6. The page will refresh; click on Choose one and select the suitable product language.
  7. Click on “Confirm“.
  8. Then, select 64-bit Download.
  9. Come back to your Downloads folder, right-click on the ISO, and select Mount.
  10. If a warning dialog appears, select Open.
  11. Right-click on Setup.exe
  12. Select Open.
  13. On the User Accounts Control prompts, click on “Yes”.
  14. Once “Windows 11 Setup” window opens, click on Next.
  15. Select Accept on the Applicable notices and license term wizard.
  16. In a little time, the Windows update will be installed without showing any error.

We hope these 9 ways will be able to Fix the Windows script host run.vbs error in your Windows 11.

Methods:
Leverage Autoruns to Turn Off Residual Processes
Run SFC Scan and DISM Commands
Turn Off Windows Script Host
Perform a Security Software System Scan
Stop the File from Loading at Startup
Edit the Script
Run System Restore
Enter Safe Mode To Delete Startup.vbs
Bring In-place Upgrade in use

That’s all!!

Sharing is caring    Share Whatsapp

 
Topics:  Windows