Fixing a RegExp Error
Thursday, March 7, 2002
When I upgraded Internet Explorer on my web server from 5 to 6, all of a sudden my RegExp code didn't work any more, with the error 8002801D Library not Found line x RegExp.
What in the world? Used to work just fine! Figured IE 6 included a VBScript update, which it did. Tried re-registering the vbscript.dll, to no avail. Downloaded and registered a new one; nope. Somehow or another I figured out the problem and got it working.
Yesterday, I was doing some periodic security updates and patches to the web server, as is the job of any good Windows administrator, and the same stupid problem came back! I quickly realized this was the same problem, but had no idea what I'd done to fix it!
Turns out it's a permissions problem; the web user can't read the RegExp object's TypeLib key. The fix is simple. Find this key, and give Everyone Full Control permissions to it and all subkeys:
HKEY_CLASSES_ROOT\TypeLib\[3F4DACA7-160D-11D2-A8E9-00104B365C9F]
I'm not sure why nobody's posted this solution anywhere else (unless nobody's using VBScript RegExp anywhere on the web, which I very much doubt), but I'll post it to Microsoft's vbscript newsgroup for reference. I'm also explaining it here instead of just linking, because I've found that newsgroup messages do not last forever.
11 Comments
- vitch: Thanks alot for this tip - I had exactly the same problem after an upgrade and this saved my skin! Just to let you know that I just gave IUSR_MACHINENAME (Internet guest account) full control rather than everyone and that seemed to work for me... Thanks again, k (commented on 5/3/2002 6:33:12 AM)
- Enno: I had the same problem aswell on a win2k server, however, fiddling with the registry permissions did not fix it for me. The problem is caused by an updated Windows Scripting Host, so if you re-install v5.1 (http://www.microsoft.com/msdownload/vbscript/scripting51.asp) everything will work fine again. You don't need to uninstall anything, just download and install wsh5.1 and everything is fine again. (commented on 5/16/2002 5:29:25 AM)
- Grégory BESSON: Many Thanks to U ! U rule ! I had the same problem and your solution has been the One ! Thanks again (commented on 6/6/2002 8:49:24 AM)
- Frank: I have a similar error: Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object: 'sgRegExp.RegExp' page, line xxx I have tried both options: registry key permits and updating VBScript engine, but it didn't worked I would apreciate any sugestions you guys could make Thank you Frank (commented on 6/11/2002 8:41:37 AM)
- Bramsi: thanks to Enno, reinstall windows scripting host v5.1 is the solution :-). (commented on 11/27/2002 5:53:48 AM)
- ZeToUne: I have the same problem after a security update of Win2k server. I can't find windows scripting host v5.1 on www.microsoft.com . Only 5.6 is available. And I can't change the permissions of the registry key. In the registry editor i don't have the field "permissions", in the edit menu even if I'm logged as local administrator. Helpp (commented on 3/21/2003 12:21:49 PM)
- David LaRocque: You'll need to use "regedt32" to get to permissions settings. You shouldn't have to go back to 5.1, which loses some features like SubMatches in 5.6, anyway. (commented on 3/21/2003 2:41:37 PM)
- remi: great that save my life. Brilliant one. I would have never guessed.. (commented on 8/1/2003 8:11:06 AM)
- William Moreno: Thank you solve my problem (commented on 9/5/2003 9:44:27 AM)
- Vicki Youll: Yes thanks very much - solved our problem also! (commented on 9/23/2003 10:43:46 AM)
- James Wang: Thanks,I meet the same problem on web hosting what I rent,too. Finally,someone took the solution,thanks God,thanks You! (commented on 9/30/2003 4:53:47 PM)
Comments are closed for this article.