News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • How do I enable VBScript?

    Posted on southieguy Comment on the AskWoody Lounge

    Home Forums AskWoody support Windows Windows 7 How do I enable VBScript?

    This topic contains 39 replies, has 6 voices, and was last updated by  Sueska 4 weeks, 1 day ago.

    • Author
      Posts
    • #1914729 Reply

      southieguy
      AskWoody Plus

      I have an important VBScript that I liked to run from time to time on my W7 SP1 laptop. Somewhere along the way, M_soft disabled it on my machine.

      How can I enable VBScript? The Fixit provided in the article referenced by Susan to enable VBScript didn’t work on my machine.

      Thanks for any help provided,

      Dick-Y

    • #1914733 Reply

      PKCano
      Da Boss

      Have you installed the August Rollup/Security-only update?
      If so, try uninstalling it.
      The August updates broke VP6, VBA and VBScript on all versions of Windows.

      1 user thanked author for this post.
    • #1914822 Reply

      southieguy
      AskWoody Plus

      I’ll do that, PKCano; but my VBScipt hasn’t worked for over 6 months. It was only upon reading Susan’s article that caused me to “wake up” and see if I could have VBScript working again.

      Dick-Y

      • #1914825 Reply

        PKCano
        Da Boss

        If it’s been out for 6 months, then the cause is not the Aug updates.
        That was just a guess considering the problems this month’s patches have caused.

        1 user thanked author for this post.
    • #1914852 Reply

      Paul T
      AskWoody MVP

      What doesn’t work?
      How do you know it doesn’t work?
      Can you run it manually from the Command Line to see what, if anything, it complains about?

      cheers, Paul

      1 user thanked author for this post.
    • #1914853 Reply

      southieguy
      AskWoody Plus

      PaulT:

      I have always run it by just opening it.  When I do that, nothing happens.  When it worked, it cleans out the notification area for me.  Trying to do what you suggested, a black screen flashed by too fast for me to see what it might be complaining about.  However, that way too, it didn’t clean out anything for me.

       

      Dick-Y

    • #1915194 Reply

      Canadian Tech
      AskWoody_MVP

      I keep saying this, but I will say it again. STOP updating. There will be no more updates in a few short months any way. I am firmly convinced that the urgency to do this updating is vastly over-blown for the ordinary joe user. (I am not speaking of enterprise installations.) My clients are that type and have not had a single Microsoft update of any kind in 27 months now. We have not had a single problem of any kind.

      CT

      2 users thanked author for this post.
    • #1915212 Reply

      southieguy
      AskWoody Plus

      I’m sorry, but how does that relate to my being able to enable VBScript?

      Dick-Y

      1 user thanked author for this post.
    • #1915245 Reply

      Canadian Tech
      AskWoody_MVP

      Roll back those last updates that caused this problem, then stop further updating.  I am convinced that the risk involved in doing updates is much greater than not updating at all.

      If you cannot roll them back, re-install windows 7, but when you do do updating to a point and stop.  I can be far more explicit about how to do this, if you are interested.  I’ve done if at least 100 times for my clients.

      CT

      1 user thanked author for this post.
    • #1915250 Reply

      southieguy
      AskWoody Plus

      CT:

      Thank you for your kind offer.  If no-one comes up with an enabling solution, I may take you up on your offer of those explicit instructions.  For now, though, I’ll wait hopefully for a solution to my problem.

       

      Dick-Y

    • #1915258 Reply

      Canadian Tech
      AskWoody_MVP

      My Windows Update strategy is based on three key events:

      1. Dec 31, 2014 all Win7 development ended. Therefore anything that is NOT security is something you do not want because it is how MS tries to make your Win7 machine operate more like win10 from its own perspective

      2. September 2016/ The last date that you were able to select out updates you do not want. Rollups began

      3. Security-only updates were available until June 2017, when they fixed a bum Security only update in a Rollup. That meant if you used a June 2017 Security only update, you installed a bug which you cannot fix unless you install a rollup. I presume this policy continues to this day

      In addition, Office updates started going haywire all over the place starting in June 2017.

      So, when you do a re-install, you want to be selective on which updates offered you accept. I follow the above dates and end all updating of any kind that was issued after May 2017.

      CT

    • #1915285 Reply

      Sueska
      AskWoody Plus

      Since this has been going on for 6 months, could your antivirus or another security program be disabling your VBScript? If so you may be able to add an exception to allow your script to run.

      1 user thanked author for this post.
    • #1915304 Reply

      southieguy
      AskWoody Plus

      I run Malwarebytes Pro, and I wouldn’t know how to do what you suggest, Sueska.

      Thank you for the reply though.

      Dick-Y

    • #1915448 Reply

      Sueska
      AskWoody Plus

      I run an older version of Malwarebytes Anti-Malware (MBAM) Pro version 1.75.0.1300. In this version there is an “Ignore list” tab. While in this tab, if you click the add button, you can browse to and add your vbscript file to exclude it. Do you have an older version too, since the paid versions of Malwarebytes are now called Premium? Alternately, if you can temporarily disable your antivirus or security program and test whether your vbscript will now run. In MBAM Pro on the protection tab, you can temporarily disable file protection by unchecking it. I have had issues with MBAM Pro and file protection in the past. In my case a reboot was needed for the change to take effect. If you make any changes for a test, remember to re-enable when done. However, if you have also installed the August windows updates, even if another security product initially broke your vbscript, it may be broken again by the August update. When there are multiple variables, troubleshooting can be tricky.
      Are you sure you are not also running an antivirus program? Malwarebytes Pro is not a stand alone antivirus and is meant to be run together with an antivirus.

      1 user thanked author for this post.
    • #1915487 Reply

      southieguy
      AskWoody Plus

      Back from a movie with my wife.  it’s late, so I’ll do the Malwarebytes step you suggest tomorrow morning.

      Microsoft’s Defender also runs on my system

      Dick-Y

    • #1915488 Reply

      anonymous

      Here are some ideas to try and help you.

      How to Enable Windows Script Host in Windows 7
      https://www.techwalla.com/articles/how-to-enable-windows-script-host-in-windows-7
      A registry key.

      enabling VBScript (windows 7)
      https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/enabling-vbscript/9c865038-bde3-4171-a406-e43b8bc6ac28
      It mentions re-registering the VBScript engine.

      Option to disable VBScript execution in Internet Explorer for Internet Zone and Restricted Sites Zone
      https://support.microsoft.com/en-us/help/4012494/option-to-disable-vbscript-execution-in-internet-explorer-for-internet
      “Click this easy fix to restore VBScript in Internet Explorer 11 for Internet Zone and Restricted Sites Zone.”
      There is a clickable link at the MS site to turn it back on.

      Mentioned for windows 10.
      Click Start > Run, type regedt32 or regedit, and then click OK.
      To enable VBScript execution in Internet Zone, locate the following registry subkey in Registry Editor:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\140C
      To enable VBScript execution in Restricted Sites Zone, locate the following registry subkey in Registry Editor:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\140C
      Right-click the appropriate registry subkey, and then click Modify.
      In the Edit DWORD (32-bit) Value dialog box, type 0
      Click OK, and then restart Internet Explorer

      https://kb.geomant.com/display/kb/How+to+enable+VBScript+execution+on+Windows+10+build+16237%2C+for+Legacy+Scripting

      Registry key to re-enable VBScript controls in Office 365
      https://gallery.technet.microsoft.com/office/Registry-key-to-re-enable-835fba77

      I like Canadian Tech and his idea. I have been following and promoting that idea -mildly- for some time. I will admit, I still do updates but will probably breath a sigh of -relief- when it is over. As long as Chrome and Firefox continue to make a web browser that is safe and operates on unsupported 7, I will be happy.

      Don’t forget to have some kind of antivirus or better anti-spyware and an AD blocker to stop the malicious web sites and advertisements.

      Keep us informed CT on how any months you have gone without updates and no issues! I am rooting for you!

      1 user thanked author for this post.
    • #1915655 Reply

      Paul T
      AskWoody MVP

      Dick, can you post the VBS file as text so we can see what it should do?

      cheers, Paul

    • #1915790 Reply

      southieguy
      AskWoody Plus

      Before I do anything else, let me start with what happened when I did what Sueska suggested:

      BTW, I also misspoke earlier.  I am running MalwareBytes Premium 3.8.3

      When I added the vbs script-file as an exclusion, rebooted, and opened the script-file, I got this message:

      “There is no script engine for the file extension “.vbs”.”

      Dick-Y

      PS,

      Here’s the text file version:

      ‘—————————————————————————–
      ‘Clears items in the Windows 7/Vista/XP Customize Notifications dialog.
      ‘This script can be used in Windows XP, Windows Vista & Windows 7 OS.
      ‘Copyright © 2009 Ramesh Srinivasan
      ‘Created on February 13, 2007
      ‘Updated on November 27, 2009
      ‘http://www.winhelponline.com/blog
      ‘—————————————————————————–

      Set WshShell = CreateObject(“WScript.Shell”)
      strComputer = “.”
      Set objWMIService = GetObject _
      (“winmgmts:\\” & strComputer & “\root\cimv2”)

      ‘Determine if Windows XP or Vista/7
      Set colOperatingSystems = objWMIService.ExecQuery _
      (“Select * from Win32_OperatingSystem”)
      For Each objOperatingSystem in colOperatingSystems
      if instr(objOperatingSystem.Caption,”Vista”) or instr(objOperatingSystem.Caption,”Windows 7″) then
      strBasekey = “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\”
      elseif instr(objOperatingSystem.Caption,”XP”) Then
      strBasekey = “HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\”
      else
      MsgBox “This script works in Windows XP, Windows Vista & Windows 7 systems only”
      wscript.Quit
      end if
      Next

      ‘Clear the Customize Notifications dialog
      On Error resume next
      WshShell.Regdelete strBasekey & “IconStreams”
      WshShell.Regdelete strBasekey & “PastIconsStream”
      On Error goto 0

      ‘Get curr. user name
      Set colItems = objWMIService.ExecQuery(“Select * From Win32_ComputerSystem”)
      For Each objItem in colItems
      strCurrentUserName = objItem.UserName
      Next

      ‘Restart user shell
      Set colProcessList = objWMIService.ExecQuery _
      (“Select * from Win32_Process Where Name = ‘Explorer.exe'”)
      For Each objProcess in colProcessList
      colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain)
      If strUserDomain & “\” & strNameOfUser = strCurrentUserName then
      objProcess.Terminate()
      end if
      Next
      strWelcome = “For more tips and articles on Windows XP/Vista/7, visit us at:” & Chr(10) & Chr(10) & vbtab & “http://www.winhelponline.com/blog”
      Msgbox “Completed!” & Chr(10) & Chr(10) & strWelcome & Chr(10),64, “Customize Notifications dialog cleared”

    • #1916767 Reply

      anonymous

      Excellent. Now you have an error message. Below are some solutions to that error.

      Error – “There is no script engine for file extension .vbs” when using “Git Bash Here” in Windows 7
      https://stackoverflow.com/questions/17757248/error-there-is-no-script-engine-for-file-extension-vbs-when-using-git-bash

      “The problem is caused by associating .vbs files with a program other than Microsoft Windows Based Script Host (the default). In my case, I had associated the files with Notepad++. I was able to solve it by running Notepad++ as an administrator and removing the file association for .vbs files.”

      Another mentioned,

      “In my case I was able to get out of this rid by re-associating the vbs files with the following command: cmd–>Run as Administrator –> now type the following command and press enter”

      assoc .vbs=VBSFile

      In a previous post I mentioned this possibility,

      enabling VBScript (windows 7)
      https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/enabling-vbscript/9c865038-bde3-4171-a406-e43b8bc6ac28
      It mentions re-registering the VBScript engine.

      Sounds like you are making headway. Good luck.

      1 user thanked author for this post.
    • #1916777 Reply

      southieguy
      AskWoody Plus

      Anon.

      Thanks.  I’ve tried the 3 mentioned.  No joy.

      I’ve just found a suggestion that required my creating a sub-key in thte Registry.

      I’m going to reboot, and give that a go

      Dick-Y

      • #1916797 Reply

        anonymous

        Dick-Y, I am sorry it didn’t work. I will continue looking too. Keep us informed. Hopefully you will succeed soon!

        1 user thanked author for this post.
      • #1916817 Reply

        anonymous

        Dick-Y, here are some other sites that seem helpful including the location of the script engine EXE. It is amazing now many ways a program can break, then need a specific fix to correct it.

        “Go to Start / Control Panel / Default Programs / “Associate a file type or protocol with a specific program” , what is the file extension .vbs associated with? Mine says “Microsoft Windows Based Script Host”. This is wscript.exe found in the C:\Windows\System32 folder.”
        https://answers.microsoft.com/en-us/windows/forum/all/there-is-no-script-engine-for-file-extension-vbs/4812c2ec-984f-4a16-9d79-96fa6125123d

        and

        [Fix] Can’t find Script Engine Vbscript, and “no script engine for .vbs”
        https://www.winhelponline.com/blog/error-there-is-no-script-engine-for-file-extension-when-running-vbs-files/

        “This happens if the Vbscript.dll module is not registered correctly or the .VBS file association settings are broken. This error can be fixed using the steps listed below, applies to Windows Vista, 7, 8, 8.1 and 10.”

        This site has 3 methods to fix it.

        Note: Several have mentioned using a “file association ZIP file for VBS”. Make sure it is a reputable site if you do use that.

        1 user thanked author for this post.
    • #1916868 Reply

      southieguy
      AskWoody Plus

      A report, before I look at the above and try some of those suggestions.

      The registry “fix” I tried did not work.  I got the same error message as before: “There is no . . .”

      Dick-Y

       

    • #1916869 Reply

      southieguy
      AskWoody Plus

      Mine says “Microsoft Windows Based Script Host” also.

      Dick-Y

       

    • #1917637 Reply

      Paul T
      AskWoody MVP

      Try running the file from a full command line.
      c:\windows\system32\wscript.exe pathto\nameoffile.vbs

      cheers, Paul

      1 user thanked author for this post.
    • #1917926 Reply

      southieguy
      AskWoody Plus

      I ran the following as an administrative Command Prompt:

      c:\windows\system32\wscript.exe D:\My_Data\Desktop\clear-notification-items.vbs

      and got the same error message as before:

      “There is no script engine for the file extension “.vbs”.”

      Dick-Y

      PS:

      Prior to doing that, last night I ran all the suggestions that Anonymous had suggested with no joy resulting.

      The last suggestion, which was a zipped registry file wouldn’t run.

      Whether I ran it under my “normal” system or in safe mode I would get this message:

      “Cannot import . . .not all data was successfully written to the registry.  Some keys are open by the system or other processes.”

      • #1918109 Reply

        anonymous

        Dick-Y, it looks as though something may had taken over that part of your registry or it is a protected area that you do not have ownership. See the below.

        [solved] Cannot import to registry.. “Not all data was successfully written to the registry. some keys are open by the system or other process, or you have insufficient privileges to perform this operation” Posted on July 28, 2013

        [solved] Cannot import to registry.. “Not all data was successfully written to the registry. some keys are open by the system or other process, or you have insufficient privileges to perform this operation”


        “To bypass “Cannot import to registry” error and force add the registry value, follow the below, steps
        Download pstools (PSTools.zip) from http://technet.microsoft.com
        Then extract PSTools.zip it in to a folder.. open a command prompt run as administrator
        (psexec -s -i -d regedit will invoke a registry editor under the powerful privileges of Windows system Account)
        Then registry editor will be opened and through file menu import the registry key you want..”

        The site shows how to do it with screenshots. Some people had success other did not.

        Let us know what happens if you decide to use it. Good luck again.

        1 user thanked author for this post.
    • #1917930 Reply

      Paul T
      AskWoody MVP

      What happens if you just type “cscript” at a Command Prompt?
      You should get “Microsoft (R) Windows Script Host…”.

      Right click on a VBS file and select Properties.
      Does it show as a “VBScript Script File (.vbs)”?

      cheers, Paul

      1 user thanked author for this post.
      • #1917959 Reply

        PKCano
        Da Boss

        Try

        cscript D:\My_Data\Desktop\clear-notification-items.vbs

        1 user thanked author for this post.
    • #1917958 Reply

      southieguy
      AskWoody Plus

      Paul:

      I do get that (version 5.8).

      Properties: type of file VBS File (.vbs)

      Opens with Microsoft Windows Based Script Host

      Dick-Y

       

    • #1917962 Reply

      southieguy
      AskWoody Plus

      PKCano:

      Tried it.  It says: “Input error:” Followed by the same “There is no script engine . . .”

      Dick-Y

    • #1918056 Reply

      southieguy
      AskWoody Plus

      This may be an off-the-wall question, but:

      Is there anyone out there, running Windows 7, who can successfully run a .vbs script?

      Dick-Y

      • #1918192 Reply

        Sueska
        AskWoody Plus

        Yes, in fact your script runs fine on my windows 7 pro. Got the message box that it completed successfully, although I did not notice any permanent change to my notification area. Some notifications icons disappeared, then re-populated. Had to clean the code up first after a copy and paste from the web of course (replace quotes , commas,etc). I am a group B updater, had a need to update early, and this month installed Aug IE cumulative patch and substituted patch KB4517297 (the one with the vb fixes) for the Aug security only patch. Did you happen to test uninstalling Aug patch in the off chance that something broke your vbscript 6 months ago and now the Aug patch has broke it again? Do you remember uninstalling an antivirus or making some significant change around the time your vbscript broke? Sounds like you tried quite a bit of troubleshooting. The following article may be one you already saw and tried, but is very interesting implicating popular antivirus programs. https://techlogon.com/how-to-fix-the-error-cant-find-script-engine-vbscript-for-script/

        1 user thanked author for this post.
    • #1918385 Reply

      southieguy
      AskWoody Plus

      Sueska:

      Yes I tried all the steps in the article you referenced, with no joy.

      I’m going to go back and uninstall the August patch, and see how that goes.

      Thank you for your suggestions.

      Dick-Y

    • #1918481 Reply

      southieguy
      AskWoody Plus

      The above anon. is me.  I forgot to login, after doing Sueska’s suggestions.

      Dick-Y

    • #1918480 Reply

      anonymous

      Dick-Y, I know a bunch of registry key ideas have been given to you by me or others. When you went in there did you look at both “HKEY_CURRENT_USER” and “HKEY_LOCAL_MACHINE” for the Script key?

      For example:
      https://www.thewindowsclub.com/windows-script-host-access-is-disabled-on-this-machine has this key to examine.
      HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings

      Also look in the Current User keys. HKEY_LOCAL_MACHINE is global and affects the OS. HKEY_CURRENT_USER only affects a specific user. So see if there -may- be two places to look for.

      This is getting tough. I hope you get resolution soon.

      1 user thanked author for this post.
    • #1919343 Reply

      southieguy
      AskWoody Plus

      Anon:

      Both the global and local keys are already set to “1”, which the article says means “enabled.”

      Since the .vbs script that started this adventure is the only one I used to run from time to time, I think trying to resolve this issue has taken up too much time for all of you, and me.  I think it is best for me to “give up the ghost” and put that script on the scrap heap.

      Thanks everyone for trying to help me.

      Dick-Y

       

       

      • #1919415 Reply

        anonymous

        Dick-Y, I am sorry you never got a resolution. I understand getting frustrated and giving up. I have seen in forums people get mad at the lack of success and “reinstall Windows” and that fixed it. You could think about doing a “Windows repair” and not loose your programs. Maybe one day the answer will pop up. I have had things not get answered for months or years later, “ohh that’s what it was” type of situation.

        I would wonder if someone made a VBS script program or editor that could help with either its own DLLs and associations to add, or a new error message more precise, on the exact problem causing this failure.

        Sorry Dick-Y.

        1 user thanked author for this post.
    • #1919465 Reply

      southieguy
      AskWoody Plus

      Thank you Anon.  Prior to receiving your response, I was going to update one more time:

      I decided to take the “nuke” approach.  I found an old image of mine, dated 12/01/2018, and restored that.

      The .vbs script worked!

      Now I have to update some software like MalwareBytes and Macrium Reflect etc.

      God bless the creators of backup/restore software; and pray for those who don’t use them.

      Dick-Y

      2 users thanked author for this post.
      • #1919537 Reply

        Sueska
        AskWoody Plus

        Glad to hear your backup got you up and running. Thanks for keeping us informed on your progress.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: How do I enable VBScript?

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.