{"id":2123,"date":"2006-07-11T17:49:00","date_gmt":"2006-07-11T17:49:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2006\/07\/11\/why-a-custom-action-may-not-run\/"},"modified":"2006-07-11T17:49:00","modified_gmt":"2006-07-11T17:49:00","slug":"why-a-custom-action-may-not-run","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/why-a-custom-action-may-not-run\/","title":{"rendered":"Why a Custom Action May Not Run"},"content":{"rendered":"<p>When it appears that a custom action in your install package or patch isn&#8217;t\nexecuting, you have to consider a couple of reasons. If the action has a\ncondition in the Condition column of\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installuisequence_table.asp\">\nInstallUISequence table<\/a>, the\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installexecutesequence_table.asp\">\nInstallExecuteSequence table<\/a>, or any of the other\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/using_a_sequence_table.asp\">\nsequence tables<\/a>, the condition may have evaluated to False. In a\n<a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2005\/12\/14\/503796.aspx\">verbose\nlog<\/a> you would see a line similar to the following.<\/p>\n<p><font face=\"monospace\">MSI (s) (74:08) [10:05:28:015]: Skipping action:\nDDSE_CA_Uninstall_InstallExecuteSequenceStarts (condition is false)<\/font><\/p>\n<p>Another common reason exists for binary custom actions: missing dependencies.\nWhen a binary custom action appears to work on your developer machine &#8211; and you\nreally shouldn&#8217;t test on your developer machine unless you&#8217;re always\n<a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/06\/13\/630069.aspx\">changing\nthe package code<\/a> &#8211; but not on a test or client machine, this is likely the\nreason. If you find that setting the\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/debugging_custom_actions.asp\">\nMsiBreak<\/a> environment variable doesn&#8217;t prompt for a debugger, this only\nstrengthens the case of missing dependencies.<\/p>\n<p>Run <i>depends.exe<\/i> on your custom action server <i>.dll<\/i> file or <i>\n.exe<\/i> file on the machine where the custom action doesn&#8217;t appear to run.\nMissing dependencies will cause the dependency walker to display an error\ndialog, an error to be printed in the bottom message window, and a yellow\nquestion mark icon next to the missing dependency in the dependency navigation\ntree. Common missing dependencies are <i>msvcr71.dll<\/i> and <i>msvcr80.dll<\/i>\n&#8211; Visual C++ 7.1 and 8.0 runtimes, respectively &#8211; and <i>pgort80.dll<\/i> &#8211; a\nlibrary linked into your executable when you instrument your project in Visual\nStudio 2005 for\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/dv_vstechart\/html\/profileguidedoptimization.asp\">\nprofile-guided optimizations<\/a>. With missing implicit or forward dependencies,\nyour executable cannot be loaded. You might instead consider statically linking\nwhat dependencies you can, such as the C runtime (CRT).<\/p>\n<p>Another common mistake is when executable custom action servers depend on\nlibraries to be installed, but the files haven&#8217;t actually been installed yet.\nFiles are installed during\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installfinalize_action.asp\">\nInstallFinalize<\/a> after\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installfiles_action.asp\">\nInstallFiles<\/a> has scheduled files to be installed via the\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installation_mechanism.asp\">\ninstallation script<\/a>. You might consider scheduling\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installexecute_action.asp\">\nInstallExecute<\/a> or\n<a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/installexecuteagain_action.asp\">\nInstallExecuteAgain<\/a> after InstallFiles if your immediate custom actions\nrequire that dependencies to be installed are actually installed first.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it appears that a custom action in your install package or patch isn&#8217;t executing, you have to consider a couple of reasons. If the action has a condition in the Condition column of InstallUISequence table, the InstallExecuteSequence table, or any of the other sequence tables, the condition may have evaluated to False. In a [&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":[14,20],"class_list":["post-2123","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-development","tag-installation"],"acf":[],"blog_post_summary":"<p>When it appears that a custom action in your install package or patch isn&#8217;t executing, you have to consider a couple of reasons. If the action has a condition in the Condition column of InstallUISequence table, the InstallExecuteSequence table, or any of the other sequence tables, the condition may have evaluated to False. In a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2123","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=2123"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2123\/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=2123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=2123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=2123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}