{"id":2203,"date":"2006-06-08T12:37:00","date_gmt":"2006-06-08T12:37:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2006\/06\/08\/run-ice-validation-and-fix-errors\/"},"modified":"2006-06-08T12:37:00","modified_gmt":"2006-06-08T12:37:00","slug":"run-ice-validation-and-fix-errors","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/run-ice-validation-and-fix-errors\/","title":{"rendered":"Run ICE Validation and Fix Errors"},"content":{"rendered":"<p>Windows Installer is a powerful yet complex technology. There are a lot of rules that have to be followed to be able to successfully install, maintain, and uninstall your product and to retain the functionality and tidy clean-up capabilities of Windows Installer. To this end, <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/internal_consistency_evaluators_ices.asp\">Internal Consistency Evaluators<\/a> (ICEs) exist to aid in validating that you have followed many of the rules and should be part of anyone&#8217;s exit criteria who&#8217;s building an installation for their product using Windows Installer.<\/p>\n<p>ICEs check the Windows Installer package database for violation of rules. Many of these are serious, such as duplicate component IDs in the same package or a component ID with lowercase letters. All errors reported by an ICE validator should be fixed, and warnings should be given some discretion.<\/p>\n<p>Errors regarding component IDs are always important to fix, because if the component IDs aren&#8217;t unique within a package or aren&#8217;t using all uppercase letters the components are not registered right and may be incorrect installed, impossible to service, or won&#8217;t be uninstalled.<\/p>\n<p>A lot of warnings such as string overflow warnings reported by <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/ice03.asp\">ICE03<\/a> can typically be ignored, but it is recommended that you fix them. In at least one case it&#8217;s more important that you fix string overflow warnings for the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/feature_table.asp\">Feature table<\/a> or the <code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msienumfeatures.asp\">MsiEnumFeatures<\/a><\/code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msienumfeatures.asp\"> function<\/a> will only return part of the feature name.<\/p>\n<p>There are lots of ways you can run validation, both manually and automatically.<\/p>\n<p>One way to run these manually is to open your <i>.msi<\/i> file in Orca (available as part of the Windows Installer SDK, but a separate install using <i>orca.msi<\/i>), click on the <b>Tools<\/b> menu, and click <b>Validate&#8230;<\/b>. You can also install <i>msival2.msi<\/i> from the same folder as <i>orca.msi<\/i> to use a command-line interface which would also be useful for automated testing.<\/p>\n<p>Besides <i>msival2.exe<\/i> for automatic testing, a COM server exists and is installed as part of Orca, named <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/using_evalcom2.asp\">EvalCom2<\/a>. Unfortunately this is not an automation server but is still pretty easy to use and integrate into your own automation tools.<\/p>\n<p>ICEs are fairly simple and you can even <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/using_internal_consistency_evaluators.asp\">write your own<\/a>. They are custom actions that are merged into an <i>.msi<\/i> or an <i>.msm<\/i> file and run explicitly to access data in the current database. They output messages in a <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/ice_message_guidelines.asp\">particular format<\/a> using either the <code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msiprocessmessage.asp\">MsiProcessMessage<\/a><\/code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msiprocessmessage.asp\"> function<\/a> or the <code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/session_message.asp\">Session.Message<\/a><\/code><a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/session_message.asp\"> method<\/a>.<\/p>\n<p>With a good set of ICEs you should be able to easily validate your packages. A <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/ice_reference.asp\">good reference<\/a> can be found online in the Windows Installer SDK &#8211; many times with possible solutions to validation issues &#8211; for ICEs provided in &#8220;ice cubes&#8221; (since the ICE packages typically have a <i>.cub<\/i> extension) that ship as part of <i>orca.msi<\/i> and <i>msival2.msi<\/i>.<\/p>\n<p>You should also check out the <a href=\"http:\/\/blogs.msdn.com\/windows_installer_team\/archive\/category\/10860.aspx\">Best Practice Guidelines<\/a> from the Windows Installer team. I also can&#8217;t emphasize <a href=\"http:\/\/blogs.msdn.com\/windows_installer_team\/archive\/2006\/05\/01\/587990.aspx\">rule #1<\/a> enough &#8211; truly understand Windows Installer before starting to use it and use a commercial tool or a tool that otherwise gives you complete control over your packages such as <a href=\"http:\/\/wix.sourceforge.net\/\">WIX<\/a>.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Installer is a powerful yet complex technology. There are a lot of rules that have to be followed to be able to successfully install, maintain, and uninstall your product and to retain the functionality and tidy clean-up capabilities of Windows Installer. To this end, Internal Consistency Evaluators (ICEs) exist to aid in validating that [&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":[20],"class_list":["post-2203","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation"],"acf":[],"blog_post_summary":"<p>Windows Installer is a powerful yet complex technology. There are a lot of rules that have to be followed to be able to successfully install, maintain, and uninstall your product and to retain the functionality and tidy clean-up capabilities of Windows Installer. To this end, Internal Consistency Evaluators (ICEs) exist to aid in validating that [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2203","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=2203"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/2203\/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=2203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=2203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=2203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}