How To Fix: Can’t find script engine “VBScript” for script error

Can’t find script engine “VBScript” for script – this error message may occur when you try to run a program that uses VBScript – a Microsoft programming language modeled on Visual Basic and included in Internet Explorer.

I first encountered it while testing a program to quickly create a system restore point but there are thousands of other programs that also use VBScript.

VBScript relies upon a specific file (vbscript.dll) being present and correctly registered in Windows.

If it isn’t (usually caused by a faulty uninstall of an antivirus program) this error message appears – in my own experience, Avast and McAfee are the most likely culprits…

Can’t find script engine "VBScript" error message

Here are two possible fixes to resolve such an error – the first is to correctly re-register the vbscript.dll file and the second If required) is to repair a specific registry setting.

Fix 1. Re-register the Vbscript.dll File

Windows 10, 8, 7 or Vista only:

Click ‘Start’ and then type cmd into the search box.

Right click on the Command Prompt (cmd.exe) program in the search results and select ‘Run As administrator

You may now see a User Account Control message asking “Do you want to allow the following program to make changes to this computer?”. Click on ‘Yes’ to confirm.

This will open an elevated (Administrator) level Command Prompt window – notice that the title of this window is ‘Administrator: Command Prompt’ which shows that it is running with elevated system privileges:

admin command prompt

Now jump to the ‘All Versions of Windows’ section below.

Windows XP only

Click on the ‘Start’ button in the bottom left of the screen and then click on ‘Run’.

Type cmd into the ‘Open’ box and press Enter – a black Command Prompt window opens.

Type the following command then press Enter: cd %windir%\system32

All Versions of Windows

You should now be in the C:\Windows\system32 directory in Command Prompt.

Type regsvr32 vbscript.dll then press Enter.

You should see a message that the operation succeeded – press OK then close the Command Prompt window.

Tip: if the operation says that vbscript.dll was not found (and you’re sure you ran the command from the system32 folder as above) then try to replace the missing vbscript.dll file by using System File Checker.

Now run the program that uses VBScript again and see if this fix works – if you still get the same “Can’t find script engine VBScript” error message, continue on and perform the second fix.

Fix 2. Repair VBScript Language Registry Setting

Be careful when editing the registry – create a System Restore point first for safety or take a backup e.g. with the Tweaking.com registry backup utility.

A. Open the Registry Editor:

  • Windows 10, 8, 7, Vista – click Start and type regedit into the Search box then click on the regedit.exe entry in the search results
  • Windows XP – click Start, then Run and then type regedit into the Run box then press OK

B. In the Registry Editor, browse to the following key:

HKCR\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32

The entry called (Default) should have a value of C:\Windows\system32\vbscript.dll as shown below (ignore the Default Engine and ThreadingModel entries, you may have different ones):

InprocServer32 Default value
Correct value of (Default)

However, an old antivirus may have set the value of (Default) to something else and, when uninstalled, it has not removed it.

So the incorrect value is still shown as below:

InprocServer32 incorrect default value by Avast
Incorrect value of (Default) – set by Avast (long since uninstalled)

If the value of (Default) is not correct then double click it and change its value to:

C:\Windows\system32\vbscript.dll then press OK.

Note: if you get an ‘Error Editing Value’ error message when you press OK, change the permissions of the InprocServer32 registry key then try again.

C. Close the Registry Editor and restart the computer.

D. Now run the program that uses VBScript again

If the incorrect registry setting was the cause of the error, the program should now work ok.

Why Is The Registry Change Required?

The (Default) value defines the .dll file to be used by VBScript – by default this is vbscript.dll

Some antivirus programs change this value to point to their own .dll file so they process the scripts to check them for signs of malicious behavior – a good thing.

However, this becomes a problem if the antivirus is uninstalled (and so deletes its own .dll file) but does not also change the (Default) value back to the original vbscript.dll file location…

In this case, a program may continue to look for the old antivirus .dll file, but that no longer exists – causing the error message that “VBScript” cannot be found.

Conclusion

There are many causes for VBScript error messages but this particular one is most often due to a badly coded uninstall of an antivirus program.

I have seen Avast uninstallation cause this problem many times and McAfee can also be responsible. Consider switching to a better antivirus program – my favorite, which I have used on all my systems for years, is Kaspersky Internet Security.

23 thoughts on “How To Fix: Can’t find script engine “VBScript” for script error”

  1. Hey Guys! The Very easy way:
    1.Open Notepad.
    2.Put in this:

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
    @=”C:\\Windows\\system32\\vbscript.dll”
    “Default Engine”=”C:\\Windows\\system32\\vbscript.dll”
    “ThreadingModel”=”Both”

    3.Save and Exit
    4.Rename it: VBSRepair.reg – (required)
    5.Open the reg file. After that restart your pc.
    That’s it…

    Sorry for bad English :)

  2. Hi,
    I cannot change the value on my laptop.
    A window pops up saying “Error writing
    the value’s new contents”.
    What to do? Any suggestions?
    Thanks

    • @Ralph – see the Note at the end of section 2 of Repair VBScript section above (the link in blue which says “change the permissions” of the InprocServer32 registry key.

  3. Perfect solution. Thank you.
    and for the record, I uninstalled McAfee before this error. so it was caused by McAfee.

  4. I cant find the registry key
    “HKCR\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32”

    Can someone help me

    • @Christian – HKCR stands for HKEY_CLASSES_ROOT
      Under that folder you’ll find CLSID (need to scroll down a long way as it does NOT have a full stop before it)
      Within the CLSID folder you should find {B54F3741-5B07-11cf-A4B0-00AA004A55E8} and then the InprocServer32 key within it

  5. Stupid Avast after uninstalling leave a link back to scripting in the registry.

    Excellent repair instructions. Thank you!!!!!

    I gave insight “AhAScr.dll” in the Windows registry and deleted all “…….. \ Avast \ AhAScr.dll” and replaced the “C:\Windows\system32\vbscript.dll”

    Thanks for the instructions.

    Excuse my bad translation.

  6. I did your guidance step by step.
    Thanks for this information, however it did not work on my windows 7 64 bit machine.
    The first part said it succeeded but my installation file still said Can’t Find Script Engine “VBScript”
    so I went on to the next part in the registry, did a FIND on value Can’t Find Script Engine “VBScript” and do not have that key apparently.

    • @sayedjamil – not sure what you’re trying to find there? Just browse down to the registry key given to find the (Default) value

  7. It is possible you have multiple instances of this key: HKCR\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32 in that case check all of them.

  8. Thanks for this information, however it did not work on my windows 7 64 bit machine.
    The first part said it succeeded but my installation file still said Can’t Find Script Engine “VBScript”
    so I went on to the next part in the registry, did a FIND on value Can’t Find Script Engine “VBScript” and do not have that key apparently. :( So I’m still stuck.

  9. Just wanted to thank you for the help with this problem I have had. The suggestions and solutions you gave has been fantastic and has helped me immensely. I have been goggling the net for help in this for a while now and you are the first one who has given the correct and real solution.
    The steps and guidelines you gave were easy to follow and very clear and precise.
    Thank you again and best regards
    Shamel

  10. Great info, clear instruction I got this problem when I uninstalled mcaffee to install bullguard but there were 4 files when I opened regedit, so which one do you edit?

    • the one with the name of (Default) assuming it points to some old Mcafee file instead of the correct vbscript.dll file

      • The default values are either blank or it says “value not set”. I tried changing them all but then my laptop would not start normally so I had to start in safe mode, revert the default values to blank and restart the computer again…

  11. Thank You…Thank You…Thank You !!!!!! ( for taking the time to post this…)

    In my case, it was an un-install of McAfee that left the remnant in the registry….
    Spent 2 days troubleshooting….wish I would have found this earlier…

    Again….thanks so much,

    C

Comments are closed.