Fixing Windows Installer Error 2738 Print E-mail
General
Written by Darwin Sanoy   
Monday, March 29, 2010 2:00am

Error 2738 is “Could not access VBScript run time for custom action <custom action name>.  You can quickly find out that you need to register vbscript.dll, but there is a nasty gotcha if you are too quick on the draw.

Ever since Windows Vista, Microsoft does not register vbscript.dll when the operating system installs.  I have also found that my vbscript.dll registration can go missing (I have recently setup auditing on the relevant COM registration keys in hopes that I can find the culprit).

If you are like me and you read “reregister vbscript.dll” you quickly open a command prompt and type “regsvr32.exe vbscript.dll”  If you do this on Windows Vista or Windows 7, this quick fix can make a mess.  Assuming you are running with UAC turned on, a default command prompt will not be elevated.  When regsvr32.exe runs it ends up registering vbscript.dll in HKCU.

However, if your custom action runs in the deferred system context (noimpersonate bit turned on), you will still have the error.  This is because Windows Vista and Windows 7 ignore HKCU based COM registrations when elevated.

The problem get’s a little deeper when you attempt to unregister vbscript.dll from HKCU using “regsvr32.exe / vbscript.dll” because it will not unregister properly.  You must manually delete the registry keys and then run regsvr32.exe while elevated.

A related problem is having a damaged vbscript.dll COM registration in HKCU and a proper one in HKLM.  The damaged HKCU one will be used by custom actions that are NOT running as administrator.

Enjoying your read? Subscribe to our newsletter (without loosing your place in this article).
captcha
(Please ensure that the confirmation email clears your spam filter so that you will see future mailings.)

To fix both possible problems be sure to delete the HKCU com registration and re-register vbscript.dll while using an elevated command prompt.

  1. Delete these registry keys
    HKEY_CURRENT_USER\Software\Classes\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
    HKEY_CURRENT_USER\Software\Classes\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}
  2. Run these commands from an elevated prompt in the System32 folder:

    regsvr32.exe vbscript.dll
    regsvr32.exe jscript.dll


Here is a registry file that can delete the keys for you:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}]
[-HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}]
 

Add comment


Security code
Refresh

Newsletter Subscription

Get our headlines in email.
captcha
Like what you are reading?
You'll Love our Training!
Check It Out