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