{"id":813,"date":"2009-01-28T02:34:26","date_gmt":"2009-01-28T02:34:26","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2009\/01\/28\/repairing-products-after-patches-advertised-features\/"},"modified":"2019-02-17T15:29:53","modified_gmt":"2019-02-17T22:29:53","slug":"repairing-products-after-patches-advertised-features","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/repairing-products-after-patches-advertised-features\/","title":{"rendered":"Repairing Products after Patches Advertised Features"},"content":{"rendered":"<p>Windows Installer supports advertising features to enable users to later install those features on demand. But Windows Installer may advertise features in when a <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/01\/23\/516457.aspx\">component is removed from a feature through obsolescence or supersedence<\/a>. This will leave the product in a broken state while reporting that the patch installed successfully.<\/p>\n<p><a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2008\/03\/07\/installing-silverlight-2-beta-1-tools-for-visual-studio-2008.aspx\">Silverlight 2.0 Beta (KB949325)<\/a> and a <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2008\/05\/16\/kb944899-should-be-removed-before-installing-visual-studio-2008-sp1.aspx\">Debugger patch (KB944899)<\/a> introduces this problem since they added components that did not exist in future patches. For Visual Studio 2008 SP1 we detect and provide a tool for this issue. But this can happen to any Windows Installer product and has happened.<\/p>\n<p>To repair these products, one would need to identify the features that were advertised by a previous maintenance installation such as patch install, and then reinstall the product passing those features to the <a href=\"http:\/\/msdn.microsoft.com\/library\/aa367536.aspx\">ADDLOCAL property<\/a> which &ndash; as its name implies &ndash; adds those features locally. To assist with this task, I have written a simple <a href=\"http:\/\/go.microsoft.com\/?LinkId=9648452\">Windows Script file<\/a> to <a href=\"http:\/\/go.microsoft.com\/?LinkId=9648451\">unadvertise features<\/a> for a product or products based on a single ProductCode or by enumerating target ProductCodes from a patch package.<\/p>\n<p>The script can be used with <em>cscript.exe<\/em> or <em>wscript.exe<\/em>, though optional verbose output will only display to the console.<\/p>\n<p>Download and extract it. Then to repair a product by ProductCode, run the following command:<\/p>\n<p><code>cscript.exe \/\/nologo Unadvertise.wsf \/ProductCode:{80C06CCD-7D07-3DB6-86CD-B57B3F0614D8}<\/code><\/p>\n<p>To repair any products a patch may target, run the following command:<\/p>\n<p><code>cscript.exe \/\/nologo Unadvertise.wsf \/Patch:\"%TEMP%VS90sp1-KB926601-x86-ENU.msp\"<\/code><\/p>\n<p>You can also pass additional properties, log verbose output, and see what would happen without actually performing a repair. These options are described on the <a href=\"http:\/\/go.microsoft.com\/?LinkId=9648451\">documentation page<\/a>.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Installer supports advertising features to enable users to later install those features on demand. But Windows Installer may advertise features in when a component is removed from a feature through obsolescence or supersedence. This will leave the product in a broken state while reporting that the patch installed successfully. Silverlight 2.0 Beta (KB949325) and [&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,34,45,51],"class_list":["post-813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation","tag-script","tag-visual-studio","tag-vs2008sp1"],"acf":[],"blog_post_summary":"<p>Windows Installer supports advertising features to enable users to later install those features on demand. But Windows Installer may advertise features in when a component is removed from a feature through obsolescence or supersedence. This will leave the product in a broken state while reporting that the patch installed successfully. Silverlight 2.0 Beta (KB949325) and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/813","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=813"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/813\/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=813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}