{"id":1493,"date":"2007-05-31T23:47:43","date_gmt":"2007-05-31T23:47:43","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2007\/05\/31\/windows-installer-errors-2738-and-2739-with-script-custom-actions\/"},"modified":"2019-02-17T15:30:17","modified_gmt":"2019-02-17T22:30:17","slug":"windows-installer-errors-2738-and-2739-with-script-custom-actions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/windows-installer-errors-2738-and-2739-with-script-custom-actions\/","title":{"rendered":"Windows Installer Errors 2738 and 2739 with Script Custom Actions"},"content":{"rendered":"<p>Windows Script custom actions <a href=\"http:\/\/blogs.msdn.com\/robmen\/archive\/2004\/05\/20\/136530.aspx\">should be avoided<\/a>. 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:<\/p>\n<ul>\n<li>2738, Could not access VBScript run time for custom action [2].\n<\/li>\n<li>2739, Could not access JScript run time for custom action [2].\n<\/li>\n<\/ul>\n<p>As <a href=\"http:\/\/blogs.msdn.com\/mikekelly\/archive\/2007\/04\/22\/problem-installing-form-fill-add-in-for-windows-live-toolbar.aspx\">some<\/a>\n\t\t<a href=\"http:\/\/sygko.net\/blog\/?p=5\">people<\/a> have found, re-registering the runtime libraries <em>vbscript.dll<\/em> and <em>jscript.dll<\/em> will fix the errors, but that isn&#8217;t always the solution.\n<\/p>\n<p>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 <a href=\"http:\/\/msdn2.microsoft.com\/library\/aa369519.aspx\">elevated install<\/a> to run their library masking as a <a href=\"http:\/\/msdn.microsoft.com\/library\/script56\/html\/4c750627-6797-4857-9f5e-e5f54371f83c.asp\">script engine<\/a> 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 <a href=\"http:\/\/msdn2.microsoft.com\/library\/aa368241.aspx\">type 6<\/a> and <a href=\"http:\/\/msdn2.microsoft.com\/library\/aa368098.aspx\">type 5<\/a>, respectively, and returns <a href=\"http:\/\/msdn2.microsoft.com\/library\/aa368542.aspx\">Windows error<\/a> 1603, ERROR_INSTALL_FAILURE.\n<\/p>\n<p>Check that <em>vbscript.dll<\/em> and <em>jscript.dll<\/em> aren&#8217;t registered in HKEY_CURRENT_USER (HKCU), checking for the registry keys below.\n<\/p>\n<ul>\n<li>VBScript, HKCUSOFTWAREClassesCLSID{ B54F3741-5B07-11CF-A4B0-00AA004A55E8}\n<\/li>\n<li>JScript, HKCUSOFTWAREClassesCLSID{ F414C260-6AC0-11CF-B6D1-00AA00BBBB58}\n<\/li>\n<\/ul>\n<p>Remove these keys if they exist in HKEY_CURRENT_USER.\n<\/p>\n<p>Also be sure that if you need to re-register <em>vbscript.dll<\/em> or <em>jscript.dll<\/em>, you run <em>regsvr32.exe<\/em> in an elevated console on Windows Vista and newer with UAC enabled; otherwise, you&#8217;ll end up registering the runtimes in HKCU.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[10,20,34,41,44],"class_list":["post-1493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-custom-actions","tag-installation","tag-script","tag-uac","tag-vista"],"acf":[],"blog_post_summary":"<p>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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=1493"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1493\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}