Fix for Windows Installer errors 2738 and 2739

When you try to install a program using Windows Installer (.msi) Setup package, you may encounter error 2738 or 2739 and the setup fails.

Errors 2738, 2739 occur if the Windows Installer Setup uses Windows Script (.vbs or .js) custom actions, and the VBScript or JScript runtimes are not registered in the computer.

Error code Description
2738 Could not access VBScript run time for custom action
2739 Could not access JScript run time for custom action

As said earlier, the above errors occur if the installer fails to run JScript/VBScripts as the VBScript/JScript engines are not working properly. The most likely cause is anti-virus software hooking into the script engine in order to block the execution of scripts.

For instance, McAfee anti-virus software replaces the vbscript.dll reference in the registry to their DLL (the version number suffix varies) below:

C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20110222204811.dll

Resolution

Windows 10 & Windows 8, Windows 7, and earlier


To automate the following steps to fix error 2738 and/or 2739, download and run the appropriate registry fix — Download vbscript_jscript_2738_2739_fix.zip


To fix the Vbscript error 2738 and/or JScript error 2739 manually:

Fix for VBScript error 2738

  1. Start the Registry Editor (regedit.exe)
  2. Go to the following branch:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32
  3. In the right-pane, double-click (default) and set its data to:
    C:\Windows\System32\vbscript.dll
  4. If you’re using the 64-bit version of Windows, additionally, go to the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32
  5. In the right-pane, double-click (default) and set its data to:
    C:\Windows\SysWOW64\vbscript.dll
  6. Go to the following keys (if they exist) under HKEY_CURRENT_USER
    HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
    HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}
  7. Delete each of the above keys.
  8. Exit the Registry Editor.

Fix for JScript error 2739

  1. Start the Registry Editor (regedit.exe)
  2. Go to the following branch:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}\InprocServer32
  3. In the right-pane, double-click (default) and set its data to:
    C:\Windows\System32\jscript.dll
  4. If you’re using the 64-bit version of Windows, additionally, go to the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}\InprocServer32
  5. In the right-pane, double-click (default) and set its data to:
    C:\Windows\SysWOW64\jscript.dll
  6. Go to the following keys (if they exist) under HKEY_CURRENT_USER
    HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}
    HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\CLSID\{f414c260-6ac0-11cf-b6d1-00aa00bbbb58}
  7. Delete each of the above keys if they exist.
  8. Exit the Registry Editor.

Tech explanation about 2738 and 2739 errors

Quoting Raymond Chen [Microsoft]

As a security measure, Windows Installer will not load script engines registered in HKEY_CURRENT_USER. As a user-writable store, a normal user could get an elevated install to run their library masking as a script engine if the custom action was not explicitly attributed with msidbCustomActionTypeNoImpersonate (0x0800). This is an elevation of privileges attack; thus, Windows Installer returns error message 2738 or 2739 for custom actions type 6 and type 5, respectively, and returns Windows error 1603, ERROR_INSTALL_FAILURE.

Check that vbscript.dll and jscript.dll aren’t registered in HKEY_CURRENT_USER (HKCU), checking for the registry keys below.

VBScript: HKCU\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
JScript: HKCU\SOFTWARE\Classes\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}

Remove these keys if they exist in HKEY_CURRENT_USER (HKCU).


An alternate method for Windows 7, Vista, and earlier

  • Open an elevated Command Prompt. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  • Run the following commands one by one and press Enter after each line:
    regsvr32 vbscript.dll
    
    regsvr32 jscript.dll

    For Windows 64-bit editions, run these two commands in addition:

    c:\windows\syswow64\regsvr32.exe vbscript.dll
    
    c:\windows\syswow64\regsvr32.exe jscript.dll

    You should see the output DllRegisterServer in filename.dll succeeded for each command. In case you get the error 0×80004005, it’s probably because you’re trying to register the DLLs from a normal (non-elevated) Command Prompt window.

  • Type Exit to close the Command Prompt window.

The Regsvr32.exe method doesn’t remove the redundant HKCU registry key. If this method doesn’t help, follow the registry editing method discussed earlier.

4 thoughts on “Fix for Windows Installer errors 2738 and 2739”

  1. I carefully tried everything in this post x2 and I cannot get past the 2738 error. I run Win 7 32bit with PowerPoint 2007. For the first time ever, there was no administrative install in the context menu and “Run as administrator” under Properties was grayed out. So I chose your suggestion to run an elevated C prompt window, but that didn’t work either. Initially, I ran both regsvr cmd’s in an elevated C prompt with success, but they were “successful” just run from the “Run” line. I also rebooted along the line to clear any memory problems that might have been there.

    I am so disappointed because I will miss out on a free copy of iSpring Presenter from giveawayoftheday.com. I’ve been working for 5 hours on this problem and your solution held out the most hope. I don’t know why it didn’t work.

    Reply
  2. Thank you very much.
    I had a problem installing cryptovision interface utility, it was giving me error 2738. After following your advice, the application installed succesfully.

    Reply
  3. You pushed me just about to my computer limit, but it worked! I was trying to upgrade a computer from windows 7 to windows 10 and it appears to be working fine now.

    Reply

Leave a Comment

Exit mobile version
0 Shares
Tweet
Share
Share