Troubleshooting VBScript

Posted: 26th January 2012 by sohail in technology
Tags: , , , ,

Yesterday, I attempted to troubleshoot an issue at work involving some of our software. I attempted all the logical steps I knew to try and then I passed off the problem to the developers. I figured in a few hours, they would come back to me with a resolution.

Unfortunately that was not the case, they were able to direct me in the right direction though. They told me that VBScript was broken. The application I was attempting to install was unable to install due to the installer trying to kick off a VB script…

This morning I came in, and figured I’d take another crack at it. I threw together a quick “Hello World” script and tried to execute it. It failed with the error:

Can’t find script engine “VBScript” for script

This bothered me a little bit… So I started doing some Googling to see how I could resolve this issue.

I came across a forum, and in there, a person stated that they had run into a similar issue, the issued stemmed from antivirus software replacing the VBScript.dll file with their own file called scriptsn.dll.

They included a reg fix:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
@="C:\\Windows\\system32\\vbscript.dll"
"ThreadingModel"="Both"

As a skeptical person, I was a little wary about what this would do, that and I’m mostly a Unix guy, so the windows registry to me is the Advanced Configuration Utility and should be handled with the same care the root account should be handled with…

I followed the path and saw that the location was legit, I simply wasnt sure what the

@="C:\\Windows\\system32\\vbscript.dll"

would do, but I decided to take a gamble and give it a shot. I kick it off and I receive the error:

Cannot edit: Error writing the value’s new contents

and so I attempted to simply replace the default key manually. When I attempted to do that, I was yelled at with the same error again.

I decided to reboot and go into safemode. I then attempted to modify the default value again, this too did not end well, it resulted in the same error again.

Once again I started with the Googling and found a post onĀ groovypost.com. I read their instructions and decided to go as far as step 2.

Under step 3, instead of selecting owners, stay on permissions. Select the user you want, and click edit. Then give the user full permissions. Now you can change the default value to

C:\Windows\System32\vbscript.dll

or you can simply run the reg file you created if you followed the forum post. After modifying the default value, I left safemode by rebooting and attempted to run my hello world script again. This time it worked. I then decided to brave the install one last time and was able to get the install to work.