When you log on to your computer, the error “Can not find script file C:\WINDOWS\run.vbs” with Windows Script Host in the title is shown on a blank screen with a black background. This happens if malware has modified the Userinit registry value, replacing the Windows default value data with a VBScript filename.
Important #1: This post explains how to fix the Userinit value and thereby helps you get access to your user profile. At the same time, the malware that caused the problem in the first place might still be active and lurking in the system. And in this case, the problem seems to have been caused by a complex malware that adds core components to the system making the removal process difficult. So, it’s highly advisable to get your system professionally checked for malware and eliminate them entirely.
Fix the Run.vbs error by correcting the Userinit value
Note: If Task Manager doesn’t open due to DisableTaskMgr Policy enabled by the Malware, carry out the following procedure via Recovery Environment. Check out the article How to Edit the Registry Offline Using Windows Recovery Environment? for more information.
- After typing the login credentials, the system may stall at Preparing to the login screen. Press Ctrl + Alt + Del, and click Task Manager.
- When the above error message dialog is visible, dismiss the dialog and switch to the Task Manager window.
- The file referenced in the
Userinitregistry value is run even before the user interface loads. To start the Explorer shell, switch to the Task Manager window, click File, and select Run new task. Type explorer.exe and press ENTER.
- Start Registry Editor (Regedit.exe) and go to:
- Double-click Userinit value and change the value data from:
to the following: [Caution: Take special care when entering. You need to remove the wscript part.]
*Important #2*: If Windows is installed in a different drive than C:\, type the actual drive letter and path. Also, include the trailing comma (,) as shown above. Take extreme care when typing the Userinit value, as typing an incorrect filename or path will prevent you from logging on to any user account. I’m not responsible if you type a wrong path and lock yourself out of your user account.
- Exit the Registry Editor.
- Log off and login back in so that the Userinit.exe loads correctly and does the initialization or preliminary jobs like running logon scripts etc.
This fixes the run.vbs login error message. Although the Vbscript file run.vbs may have been deleted by your anti-virus software, running a thorough scan is still advisable.
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!