• Without system files, no computer system may operate correctly. However, errors are not out of the question.
  • Users find the Script file run.vbs is missing on startup error as an annoyance. They are encouraged to act fast and get back to running the OS as smoothly as possible.
  • To fix this problem, using a Windows restore point and performing a detailed system scan are both recommended.
  • This isn’t the only time when your PC goes wrong. However, most glitches can be solved by following the solutions from our dedicated Windows 10 errors hub.
Script file run.vbs is missing on startup on Windows 10

Windows 10 runs a series of essential scripts on startup, but sometimes users may encounter various error messages preventing them from logging in.

One of the most frequent startup errors is this one: Can not find script file C:WINDOWSrun.vbs. When users try to log in, a pop-up window appears on a black screen, informing users that the script file run.vbs is missing.

What does Cannot find script file mean? This error means that a malicious program modified your computer’s registry. Fortunately, there are some quick workarounds that you can use to fix this and we’re going to list them all.

Run.vbs error can sometimes appear on your PC and cause certain issues. This can be an annoying problem, and speaking of problems, here are some similar issues that users reported:

  • Cannot find script file – This is a variation of this problem, and it still appears on previous Windows versions as well. To fix it, create a new user profile and check if the problem still appears.
  • Run.vbs error Windows 7, 8.1, 10 – Unfortunately, this error can appear on any version of Windows, and previous Windows versions aren’t an exception. However, you can fix the issue using one of our solutions.
  • Run.vbs error at startup – If this problem appears right on startup, it’s rather likely the issue is caused by malware. To fix the problem, modify your registry and perform a full system scan.

How to fix error: Can not find script file C:WINDOWSrun.vbs?

1. Use a Windows restore point

Because of the black screen, it’s difficult to locate and uninstall the malicious software that’s causing startup issues.

As a result, you should use your system’s restore point and revert the OS to the point where this malware wasn’t present on your machine.

To run System Restore, do the following:

  1. Press Windows Key + R to open the Run dialog. Now enter %systemroot%system32rstrui.exe and press Enter or click OK.
    Run.vbs error at startup
  2. Select Choose a different restore point and click Next.
    Cannot find script file Windows 7
  3. Now check Show more restore points checkbox and select the desired restore point from the menu. Pay attention to the Date and Time section, and pick a time when the issue wasn’t present on your PC. Now click Next to proceed.
    Run.vbs error Windows 10
  4. Follow the instructions on the screen to complete the restoration process.

Restore Point is not working in Windows 10? Check out this guide that will help you solve them in no time.


2. Run the commands listed below

If there is no system restore point available on your computer, follow the troubleshooting steps listed below:

  1. Type cmd in the Search Menu > run Command Prompt as an administrator.
  2. Type the following commands:
  • reg add “HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon” /v “Shell” /t REG_SZ /d “explorer.exe” /f
  • reg add “HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogon” /v “Userinit” /t REG_SZ /d “C:WindowsSystem32userinit.exe,” /f
  • reg add “HKLMSoftwareWow6432NodeMicrosoftWindows NTCurrentVersionWinlogon” /v “Shell” /t REG_SZ /d “explorer.exe” /f

After you run all commands, restart your PC.


3. Perform a detailed system scan

Run.vbs error Windows 7

It’s rather likely that run.vbs error was caused by malware on your PC. Sometimes malware will modify your registry and cause this problem to appear.

To make sure that your system is malware-free, we advise you to perform a full system scan with your antivirus. It’s worth mentioning that not all antivirus tools are equally effective, so you might want to consider our top picks.

Once you perform a full system scan and remove all malware from your PC, the problem should be completely resolved.


4. Modify your registry

If you’re getting run.vbs error on your PC, the problem might lie in your registry. Sometimes malicious applications can modify your registry and cause this issue to appear.

However, you can fix the problem simply by making a couple of changes in your registry. To do that, just follow these steps:

  1. Press Windows Key + R and enter regedit. Now press Enter or click OK.
    Run.vbs error at startup
  2. When Registry Editor opens, navigate to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon in the left pane. In the right pane, double-click the Userinit value.
    Cannot find script file Windows 7
  3. Make sure that Value data is set to C:Windowssystem32userinit.exe, and now click OK to save changes.
    Cannot find script file Windows 7

Sometimes your PC might be infected with malware, and that malware will change the Userinit value in your registry. However, after modifying the registry, the issue should be completely resolved.

Several users reported that they are getting a black screen that is preventing them to do anything on their PC. If this happens, you won’t be able to access Registry Editor using the conventional methods.

However, you can avoid this problem by doing the following:

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. When Task Manager opens, go to File > Run new task.
    Run.vbs error at startup
  3. Enter regedit and press Enter.
    Cannot find script file Windows 7

After Registry Editor opens, follow the instructions from above to change Userinit value.


Windows 10 won’t end task in Task Manager? Everything you need to know in order to fix this is right here.


5. Change the value of .vbs key in the registry

According to users, run.vbs error can appear on your PC because the value of .vbs key was changed. To fix this problem, you need to do the following:

  1. Open Registry Editor like we showed you in the previous solution.
  2. Navigate to ComputerHKEY_CLASSES_ROOT.vbs in the left pane. In the right pane, double-click the (Default) value.
    Run.vbs error Windows 7
  3. Set the Value data to VBSFile and click OK.
    Run.vbs error at startup

After making these changes, check if the problem is resolved.


6. Perform SFC and DISM scans

If you’re having run.vbs error on your PC, the cause might be the corruption of system files. However, you can fix this issue simply by running SFC and DISM scans on your PC. To do that, follow these steps:

  1. Press Windows Key + X to open Win + X menu. Choose Command Prompt (Admin) or PowerShell (Admin).
    Run.vbs error at startup
  2. When Command Prompt starts, enter sfc /scannow command and run it.
    Run.vbs error Windows 8.1
  3. The SFC scan will now commence. Keep in mind that the scan can take about 15 minutes, so don’t interfere with it in any way.

After the SFC scan is finished, the problem should be resolved. If this issue is still present, you need to perform a DISM scan. You can do that by following these steps:

  1. Start Command Prompt as administrator.
  2. Run DISM /Online /Cleanup-Image /RestoreHealth command.
    Run.vbs error Windows 8.1
  3. The DISM scan will now start. This scan can take about 20 minutes or more, so don’t interrupt it.

Once the DISM scan is finished, check if the problem is still there. If DISM failed on Windows 10,  fix it with the help of this complete guide.

If you can’t see anything except the black screen, you’ll have to run Command Prompt by doing the following:

  1. Press Ctrl + Shift + Esc to start Task Manager.
  2. Now go to File > Run new task.
  3. Enter cmd and make sure to check Create this task with administrative privileges. Now click OK or press Enter.
    Cannot find script file Windows 7
  4. Once the Command Prompt starts, run both SFC and DISM scans.

7. Navigate to Safe Mode

Safe Mode is a segment of Windows that runs with default settings, so it’s perfect for troubleshooting problems such as run.vbs error. To enter Safe Mode, follow these steps:

  1. Restart your PC several times during the boot sequence.
  2. You’ll see three options available. Choose Troubleshoot > Advanced options > Startup Settings. Click the Restart button.
  3. Your PC will now restart. Once your PC boots, select any version of Safe Mode by pressing the appropriate key on your keyboard.

Once you enter Safe Mode, check if the problem is still there. If the issue doesn’t appear in Safe Mode, you can use it to fix the problem.


8. Create a new user account

If you keep getting run.vbs error on your PC, you might be able to fix the problem simply by creating a new user account. Sometimes this problem can only affect your account, but you can fix that by doing the following:

  1. Go to Settings app >Accounts. Run.vbs error Windows 7
  2. Go to Family & other people. Select Add someone else to this PC in the right pane.
    Run.vbs error at startup
  3. Select I don’t have this person’s sign-in information.
  4. Up next, choose Add a user without a Microsoft account.
  5. Enter the desired username and click Next.
    Cannot find script file Windows 7

If you can’t access the Settings app due to this issue, you can create a user account from the Command Prompt. To do that, follow these steps:

  1. Start Command Prompt as an administrator.
  2. When the Command Prompt starts, run the following commands:
  • net user /add your_username
  • new localgroup administrators your_username /add

After running these two commands, you’ll create a new administrator account on your PC. Simply switch to the new administrative account and check if the issue appears there as well.

If the issue isn’t present on the new account, move your personal files to it, and start using it instead of your old account.

Run.vbs error can be quite annoying, but we hope you managed to fix it by using one of our solutions.

FAQ: Learn more about Script errors

  • How do I stop Script errors?

To stop Script errors from showing up, tell your browser to ignore these errors when they occur and not alert you any longer. If you are still getting them, chances are you have some adware installed. To confirm that, use an uninstaller software tool to temporarily remove it.

  • What causes Script errors?

Script errors are usually caused by an error within a script that’s hosted on a different domain. They may also be related to some sort of spyware or adware infection, so stop clicking on suspicious online ads or opening spam emails.

  • Why do I keep getting Script errors?

You keep getting Script errors when violating the browser’s policy or if your computer is infected with malware. Keep in mind that it’s essential to use a reliable antivirus to prevent that from happening.

Editor’s Note: This post was originally published in January 2017 and has been since completely revamped and updated for freshness, accuracy, and comprehensiveness.

Was this page helpful?
Thanks for letting us know!
Get the most from your tech with our daily tips
Tell us why!