How to Fix Windows Script Host Errors on Startup

The Windows Script Host Error can seem like a virus or malware infection to the untrained eye, however, it is nothing more than an error with the VBScript file. It appears with all versions of the operating system, and it doesn’t depend on any specific software that may trigger it.

If this error happens, people could advise you to scan your system for malware, but certain users have even reported that their antivirus cleaned the virus but left the entry to trigger the .vbs file intact, and they still received the error.

Even so, there are a few things that you can try to solve this issue, and all have been reported to work by different users, meaning it might take a little trial and error to get things right, but the methods are guaranteed to help you.

windows-script-host

Method 1: Run the System File Checker to scan the system

This is a solution for a number of problems, and it’s also been reported to work with this one as well.

  1. Open an Elevated Command Prompt. This is done by pressing the Windows key on your keyboard, typing cmd, and right-clicking the result, then choosing Run as administrator.
  2. From within the Elevated Command Prompt, type sfc /scannow , and press Enter on your keyboard. The command will scan the entire system integration, and will also fix any corruption found within. Afterward, you shouldn’t be having this problem.

sfcscannow

Method 2: Use the Registry Editor to solve the issue

Option 1: Return the default value of .vbs to VBS file

  1. Press simultaneously the Windows and R keys on your keyboard to open the Run dialogue. Type regedit and press Enter to open the Registry Editor.
  2. In the left navigation pane, expand the HKEY_CLASSES_ROOT folder, and click on the .vbs folder inside.
  3. In the right side, double-click the (Default) key, and set its value to VBSfile. Close the registry editor and your system should be working alright now.

vbsfile

Option 2: Delete the entries after userinit.exe

  1. Open the Registry Editor as described in Step 1 of the previous method.
  2. From the left navigation pane, expand the following folders: HKEY_LOCAL_MACHINE, then SOFTWARE, then Microsoft, then Windows NT, followed by CurrentVersion and in the end, click on Winlogon.
  3. In the right side window, delete all entries after userinit.exe. This will probably include wscript.exe and NewVirusRemoval.vbs. Close the Registry Editor when you’re done, and everything should be working again.

userinit

Option 3: Delete the *.vbs entry which shows up on your startup

This method requires you to boot into Safe Mode, which is done by pressing F8 when you turn on your computer, right before Windows boots and choosing the Safe Mode option in the menu on a Windows Vista and 7 system.

safe-mode-1

For Windows 8 and 10 see steps at “boot Windows 8 or 10 in Safe Mode

  1. Once you’ve booted into Safe Mode, open the Registry Editor again as described earlier.
  2. Press simultaneously the Ctrl and F keys on your keyboard to open the Find menu. In the box type nameofthe.vbs (File) that shows up at startup and press the Find Next button.
  3. This search will end up in a folder at the userint key. Double click it, and you will see a number of paths, separated by commas. Find among the paths “the VBS file”, and delete the path. Be careful not to change any of the other paths.
  4. Press F3 on your keyboard to see whether the path is also somewhere else in your registry. If it is, delete it using the instructions from the previous step. Repeat this process until you get a message that says that the search has finished. Close the Registry Editor.
  5. Press Windows and E at the same time on your keyboard to open the File Explorer. Run a search for the VBS file, which showed up at startup in the partition where your operating system is installed, and delete that file as well.

At the end of the day, this problem can be a tedious task to solve. However, if you simply follow the instructions in the aforementioned methods, you will get rid of it and you won’t have to deal with it again.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

18
    FM
    feven Michael Nov 13, 2017

    what happens if all don’t work

      KA
      K. Arrows Author Nov 13, 2017

      Can you explain please

      TS
      Taylor Spark Feb 9, 2018

      RIP it might actually be a virus then I don’t know, I’m just a child who knows a decent amount about technology… I saw another person only do 2 of the methods. Did you try ALL of them EVERY SINGLE ONE for SURE???? There are 4 methods

        SY
        Syiem Apr 16, 2018

        i choose method 2, option 2.. thank god.. the windows script host dont appear again.. thank you for your help

    BH
    Ben Heidrich Jan 7, 2018

    Hey, i tried both methodes, but in method 2 just Option 1 and 2 but not 3. Im a bit scared that something happens when i reboot my Computer in safe mode or something like that. But all other methods/Options didnt help me. And this Screenshot Shows my Error: http://prntscr.com/hx8cba I got Windows 10 by the way. Would be nice if i hear some Feedback soon, Thank you 🙂

    TS
    Taylor Spark Feb 9, 2018

    I was just wondering, how do you fix one of these if thy say something like

    Windows Script Host
    ERROR
    Could not find Checker.dbs

    I’m personally a Modder for video games, and i love to mess around with files and such, but sometimes i do more damage than i can fix, viruses don’t matter to me, but this just isnt fixable by me. Did the scan 100% WIN 10 btw. Haven’t tried the second method, trying it now.

    MR
    mrandinoor Jul 16, 2019

    https://uploads.disquscdn.com/images/5bd1f0824ce41017b970b6edd3b49a406857ac83040d77b5421c7289fe0a4032.png

    i followed method 1 and method 2 : option 1 & 2, and none of them worked..
    and then i tried to install ccleaner, and tried this, and fortunately worked.. lol 🙂

    PS
    Prateek Sahoo Dec 3, 2019

    It worked for me. The first step and its easy aswell.

    MA
    Manikandan Dec 26, 2019

    I have done everything according to your procedure but i cant fix my problem (Windows Script Host) .I dont know why?
    Guys please help me to solve it.

      SW
      Shane Warren Author Dec 29, 2019

      What error are you facing? the exact error.

        RM
        Ramsha Masud Sep 26, 2022

        How did you fixed you error? Please let me know

    Q(
    QualityGooseNeck (tutti) Mar 20, 2020

    How to fix these problems… YES I KNOW I HAVE FOUR!
    1. Can not find script file ”D:TempvLkEX.vbs”
    2. Can not find script file ”D:TempFKCM.vbs”
    3. Can not find script file ”D:TempoQOg.vbs”
    4. Can not find script file ”D:TempExRst.vbs”
    Also i tried all the methods… NONE WORKED!

      SW
      Shane Warren Author Mar 21, 2020

      This is a whole another problem, Google for its solutions the registry needs to be tweaked a bit to fix this isssue.

    CJ
    Captian Jeff Sep 5, 2023

    I’ve recently started to receive these two errors upon start-up: Can not find script file “C:UsersPublicWorkstation.vbs”. and Can not find script file “C:UsersPubliccode2024.vbs”. Of course when I “X” them they reappear in about a min. . I understand it might be some kind of a malware hack, “Malware.VBS/Runner.VPVS” My security program put this into quarantine but in the meantime I still get these two errors, how do I correct this?

      MZ
      Muhammad Zubyan Author Sep 6, 2023

      When an antivirus quarantines a file it’s essentially locked and whenever you try to open said file you will receive “Could not find script” errors simply because your operating system is unable to access those files. I suggest you not to run it as it can be malicious if it’s being blocked by your anti-virus.

        CJ
        Captian Jeff Sep 8, 2023

        Is there any way to stop the errors from continuing to pop up? I drag them off to the side of the screen where they are mostly out of view but they are still there. I removed all the files in the “C:UsersPublic” folder and of course now I have 3 errors, but I was hoping that I could go to windows and reload the Windows Based Script Host (if it’s there), would that stop the errors??

          MZ
          Muhammad Zubyan Author Sep 11, 2023

          Yes! you can stop them by removing them from Task Schedular and Startup.Please contact me on my Discord so that I can help you further. My Discord is Zubyan Gull#9955 or @zubyan

          CJ
          Captian Jeff Sep 12, 2023

          Okay, I registered at Disqus and sent you a friend request so we talk about my problem, being new to this site I’m still pounding around here to figure things out……In the meantime i went to Task Schedular but got lost trying to figure that out, thanks for sticking with me, hope to hear back from you soon..