| Fixing Windows Installer Error 2738 |
|
|
| 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. To fix both possible problems be sure to delete the HKCU com registration and re-register vbscript.dll while using an elevated command prompt.
Windows Registry Editor Version 5.00 |