Welcome to MSDN Blogs Sign in | Join | Help

Windows Installer Errors 2738 and 2739 with Script Custom Actions

Windows Script custom actions should be avoided. They are difficult to debug, get blocked by virus scanners, and are far more susceptible to machine state than native custom actions. That is indicated by Windows Installer error messages 2738 and 2739, which read:

  • 2738, Could not access VBScript run time for custom action [2].
  • 2739, Could not access JScript run time for custom action [2].

As some people have found, re-registering the runtime libraries vbscript.dll and jscript.dll will fix the errors, but that isn't always the solution.

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.

Also be sure that if you need to re-register vbscript.dll or jscript.dll, you run regsvr32.exe in an elevated console on Windows Vista and newer with UAC enabled; otherwise, you'll end up registering the runtimes in HKCU.

Published Thursday, May 31, 2007 8:47 PM by Heath Stewart

Comments

Thursday, June 28, 2007 8:34 AM by Loukkis

# re: Windows Installer Errors 2738 and 2739 with Script Custom Actions

If you are running Vista 64 bit, you might want to run c:\windows\syswow64\regsvr32 vbscript.dll instead of system32.. :-)

Tuesday, July 10, 2007 9:47 AM by steve

# re: Windows Installer Errors 2738 and 2739 with Script Custom Actions

well ive removed the key but how do i re-register them?

Tuesday, July 10, 2007 10:28 PM by Heath Stewart

# re: Windows Installer Errors 2738 and 2739 with Script Custom Actions

You may not need to. These should always be in HKLM. If they're not, then you should run "regsvr32 vbscript.dll" and/or "regsvr32 jscript.dll" *from an elevated console*.

Thursday, August 09, 2007 9:53 AM by Clara

# re: Windows Installer Errors 2738 and 2739 with Script Custom Actions

Where do I find the reg keys at... Not computer savey.. This really helped..

Thursday, August 09, 2007 10:44 AM by Heath Stewart

# re: Windows Installer Errors 2738 and 2739 with Script Custom Actions

Clara, my coworker, Aaron Stebner, has more information about how to find and remove these keys based on my post here.

http://blogs.msdn.com/astebner/archive/2007/06/07/3151752.aspx

Friday, September 14, 2007 9:43 AM by TrackBack

# http://community.hautesecure.com/forums/t/53.aspx

Friday, September 14, 2007 9:45 AM by TrackBack

# http://joyofsetup.com/2007/06/07/when-vbscript-and-jscript-custom-actions-are-even-more-evil/

Friday, September 14, 2007 9:45 AM by TrackBack

# http://forums.microsoft.com/msdn/showpost.aspx?postid=1267403&siteid=1

Tuesday, April 01, 2008 8:58 PM by Aaron Stebner's WebLog

# How I resolved Windows Installer error code 2738 on Vista while running light.exe from WiX v3.0

Recently, while attempting to build a Japanese MSI using WiX v3.0 , I received an error message that

New Comments to this post are disabled
 
Page view tracker