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

Error 2738 is “Could not access VBScript run time for custom action .  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.  64-bit Windows also requires special care.

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 -u 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.

Finally, I suspect, but have not been able to prove (yet) that some setups (MSI or EXE) use manual means to attempt add or remove (on uninstall) the DLL registration keys for vbscript.dll in HKCU.

Enjoying your read? Subscribe to our newsletter (without loosing your place in this article).
(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

    For 64-bit, delete:

  2. Run these commands from an elevated prompt:

    For 64-bit, start cmd.exe from "%windir%\sysWOW64\cmd.exe" (DO NOT simply change to the folder from a 64-bit CMD.EXE, you will still run the 64-bit version)

    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


Add comment

Security code