<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Windows Installer MSI &amp; Clickonce issues</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/msiclickonce/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/msiclickonce/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:23:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>VS2010 Setup project - Migration from VS2008 does not work with Upgrades</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/vs2010-setup-project-migration-from-vs2008-does-not-work-with-upgrades</link>
      <pubDate>Tue, 03 Aug 2010 13:25:39 GMT</pubDate>
      <dc:creator><![CDATA[Soumitra Mondal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/08/03/vs2010-setup-project-migration-from-vs2008-does-not-work-with-upgrades/</guid>
      <description><![CDATA[Symptom 
Migrated a Setup project from VS2008 to VS2010 and set RemovePreviousVersion=True so as to...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in 0in 10pt; line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 3;" class="MsoNormal"><b><span style="font-size: 10.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Symptom <o:p></o:p></span></b></p>
<p style="margin: 0in 0in 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Migrated a Setup project from VS2008 to </span><b><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt;">VS2010</span></b><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"> and set RemovePreviousVersion=True so as to effect a Major Upgrade. The MajorUpgrade finishes with files being removed from the application folder. <o:p></o:p></span></p>
<p style="margin: 0in 0in 10pt; line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 3;" class="MsoNormal"><b><span style="font-size: 10.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Cause <o:p></o:p></span></b></p>
<p style="margin: 0in 0in 0pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Component GUID's are changed when setup projects are migrated from VS2008 to </span><b><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt;">VS2010</span></b><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">. InstallValidate marks components to be installed locally, RemoveExistingProducts that run at sequence 6550 ends up removing these components. <o:p></o:p></span></p>
<p style="margin: 0in 0in 10pt; line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-outline-level: 3;" class="MsoNormal"><b><span style="font-size: 10.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">Resolution <o:p></o:p></span></b></p>
<p style="margin: 0in 0in 7.5pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';">* Manually change the component GUID's to be the same as that of VS2008 (this might not be a feasible solution) <br /><br />* Resequence RemoveExistingProducts right after InstallInitialize (sequence number 1525). This ensures that older files are removed and reinstalled by the newer version. </span></p>
<p style="margin: 0in 0in 7.5pt; line-height: normal;" class="MsoNormal"><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"></span></p>
<p><span style="font-size: 8.5pt; font-family: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';"><o:p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;" lang="EN"><span style="font-size: small;">Contributor <span style="mso-spacerun: yes;">&nbsp;</span>: <span style="mso-spacerun: yes;">&nbsp;</span>Ravi Shankar&nbsp;</span></span></b></p>
</o:p></span></p>]]></content:encoded>
    </item>
    <item>
      <title>ClickOnce - .net 4.0 errors: "Deployment manifest is not semantically valid" and "Deployment manifest is missing &lt;compatibleFrameworks&gt;"</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/clickonce-net-4-0-errors-deployment-manifest-is-not-semantically-valid-and-deployment-manifest-is-missing-compatibleframeworks</link>
      <pubDate>Tue, 03 Aug 2010 13:22:59 GMT</pubDate>
      <dc:creator><![CDATA[Soumitra Mondal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/08/03/clickonce-net-4-0-errors-deployment-manifest-is-not-semantically-valid-and-deployment-manifest-is-missing-compatibleframeworks/</guid>
      <description><![CDATA[Team Build 2010 is being used to build the deployment manifest for a .Net 4.0 application to be...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Team Build 2010 is being used to build the deployment manifest for a .Net 4.0 application to be deployed via ClickOnce.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">The application manifest is being built using mage.exe</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">After the application and deployment manifests have been built successfully application is attempted to be installed, it comes up with error</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Error Message:</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">ERROR SUMMARY</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Below is a summary of the errors, details of these errors are listed later in the log.</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>* Activation of https://NGIMSMOKECRMDB.parttest.extranettest.microsoft.com:555/NgimMsCrmClient/NgimMsCrmClient_DAILYBUILD.application resulted in exception. Following failure messages were detected:</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>+ Deployment manifest is not semantically valid.</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>+ Deployment manifest is missing &lt;compatibleFrameworks&gt;.</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-size: small;"><span style="font-family: Calibri;">Solution:<o:p></o:p></span></span></b></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">GenerateDeploymentTask will need the TargetFramework attribute to be set.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">This can be done by setting TargetFrameworkMoniker input parameter in GenerateDeploymentManifest to ".NETFramework,Version=v4.0"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">An example of how this looks is as below.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">&lt;Project DefaultTargets="NgimCustomBuild" xmlns="https://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion ="4.0"&gt;</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">&lt;GenerateDeploymentManifest<span style="mso-spacerun: yes;">&nbsp; </span></span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>AssemblyName ="$(AppName).application" </span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TrustUrlParameters="true"</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">&hellip; &hellip;</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TargetFrameworkVersion="v4.0"</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TargetFrameworkMoniker=".NETFramework,Version=v4.0"<o:p></o:p></span></span></b></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">&hellip; &hellip;</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&gt;&lt;/GenerateDeploymentManifest&gt;</span></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;"></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;" lang="EN"><span style="font-size: small;">Contributor <span style="mso-spacerun: yes;">&nbsp;</span>: <span style="mso-spacerun: yes;">&nbsp;</span>Ravi Shankar&nbsp;</span></span></b></p>]]></content:encoded>
    </item>
    <item>
      <title>ClickOnce - File accociations are lost upon progrmmatic updates to ClickOnce on Win 7 X64</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/clickonce-file-accociations-are-lost-upon-progrmmatic-updates-to-clickonce-on-win-7-x64</link>
      <pubDate>Tue, 03 Aug 2010 13:20:35 GMT</pubDate>
      <dc:creator><![CDATA[Soumitra Mondal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/08/03/clickonce-file-accociations-are-lost-upon-progrmmatic-updates-to-clickonce-on-win-7-x64/</guid>
      <description><![CDATA[File associations created for ClickOnce applications are lost only on Win 7 X64 bit machines upon a...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">File associations created for ClickOnce applications are lost only on Win 7 X64 bit machines upon a programmatic update.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Bug in ClickOnce due to Registry reflection disabled in Win 7.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Programmatic updates with ClickOnce run under Wow64 on Win 7 X64 and cannot write the registry information for the file associations under the 64 bit registry nodes.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Bug not fixed yet, workarounds involve either disabling programmatic updates for Win 7 X64 and have users upgrade the application from the installation URL. OR Release a X64 build for X64 bit machines.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;"></span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;" lang="EN"><span style="font-size: small;">Contributor <span style="mso-spacerun: yes;">&nbsp;</span>: <span style="mso-spacerun: yes;">&nbsp;</span>Ravi Shankar&nbsp;</span></span></b></p>]]></content:encoded>
    </item>
    <item>
      <title>VS Setup project - vsdraCOM sets codebase in registry to point to the SourcePath</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/vs-setup-project-vsdracom-sets-codebase-in-registry-to-point-to-the-sourcepath</link>
      <pubDate>Tue, 03 Aug 2010 13:17:45 GMT</pubDate>
      <dc:creator><![CDATA[Soumitra Mondal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/08/03/vs-setup-project-vsdracom-sets-codebase-in-registry-to-point-to-the-sourcepath/</guid>
      <description><![CDATA[Using VS Setup project to deploy an application that uses COM component. The COM component is being...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Using VS Setup project to deploy an application that uses COM component. The COM component is being registered by setting vsdraCOM. When the application is installed on the target machine the registry codebase for the COM component is pointing to the sourcepath.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Using VS Setup project to deploy an application that uses COM component. The COM component is being registered by setting vsdraCOM. When the application is installed on the target machine the registry codebase for the COM component is pointing to the sourcepath.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">We first set the register property for the COM component to DoNotRegister. Used regasm from the Visual Studio 2005 command prompt with the following parameters.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Regasm.exe /regfile: /codebase </span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">This would generate a reg file under the specified path. Now manually edit the reg file to replace the codebase information and change it to [TARGETDIR]</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Save the reg file and do the following in Visual Studio Setup project.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Right Click On the setup project goto View and select Registry editor. Right Click on Registry on Target machine and select Import. Point to the modified reg file and rebuild the project.</span></p>
<p>&nbsp;</p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;" lang="EN"><span style="font-size: small;">Contributor <span style="mso-spacerun: yes;">&nbsp;</span>: <span style="mso-spacerun: yes;">&nbsp;</span>Ravi Shankar&nbsp;</span></span></b></p>]]></content:encoded>
    </item>
    <item>
      <title>VS Setup project - Pass Checkbox properties as arguments to MSI during silient installations</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/vs-setup-project-pass-checkbox-properties-as-arguments-to-msi-during-silient-installations</link>
      <pubDate>Tue, 03 Aug 2010 12:55:00 GMT</pubDate>
      <dc:creator><![CDATA[Soumitra Mondal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/08/03/vs-setup-project-pass-checkbox-properties-as-arguments-to-msi-during-silient-installations/</guid>
      <description><![CDATA[Checkboxes are used in Install UI to select what files need to be installed. This works fine when...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">Checkboxes are used in Install UI to select what files need to be installed. This works fine when installing in full UI. During silent installation via the command line, the property cannot be set as arguments to msiexec.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">The property values are initialized to 1 in the property table. The Setup project builds the MSI with CustomActions in the InstallExecuteSequence that reset these property values to Null. Its only in the UI when the CheckBox dialog is created the actual property values are set. Therefore no matter what values we pass from the command line to the properties they are always getting reset to Null and never being set to the desired values.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">The condition I had to use was CHECKBOXA1&lt;&gt;&rdquo;&rdquo;</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">had to remove some entries from the InstallExecuteSequence and the Property tables. This I have done using a post build event as below.</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><o:p><span style="font-size: small; font-family: Calibri;">&nbsp;</span></o:p></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `InstallExecuteSequence` WHERE `InstallExecuteSequence`.`Action`='CustomCheckA_SetProperty_CHECKBOX1'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `InstallExecuteSequence` WHERE `InstallExecuteSequence`.`Action`='CustomCheckA_SetProperty_CHECKBOX2'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `InstallExecuteSequence` WHERE `InstallExecuteSequence`.`Action`='CustomCheckA_SetProperty_CHECKBOX3'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `InstallExecuteSequence` WHERE `InstallExecuteSequence`.`Action`='CustomCheckA_SetProperty_CHECKBOX4'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `Property` WHERE `Property`.`Property`='CHECKBOXA1'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `Property` WHERE `Property`.`Property`='CHECKBOXA2'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `Property` WHERE `Property`.`Property`='CHECKBOXA3'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><span style="font-size: small; font-family: Calibri;">cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "DELETE FROM `Property` WHERE `Property`.`Property`='CHECKBOXA4'"</span></p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal">&nbsp;</p>
<p style="margin: 0in 0in 10pt;" class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="color: black; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri;" lang="EN"><span style="font-size: small;">Contributor <span style="mso-spacerun: yes;">&nbsp;</span>: <span style="mso-spacerun: yes;">&nbsp;</span>Ravi Shankar&nbsp;</span></span></b></p>]]></content:encoded>
    </item>
    <item>
      <title>ClickOnce -- TargetFrameworkVersion</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/clickonce-targetframeworkversion</link>
      <pubDate>Mon, 21 Jun 2010 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Aditya Hari]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2010/06/21/clickonce-targetframeworkversion/</guid>
      <description><![CDATA[Issue:
===============
Though the ClickOnce application is set to ToolsVersion="3.5" and the...]]></description>
      <content:encoded><![CDATA[<p><o:p><span style="font-family: Calibri; font-size: small;">
<p class="MsoNormal">Issue:<o:p></o:p></p>
<p class="MsoNormal">===============<o:p></o:p></p>
<p class="MsoNormal">Though the ClickOnce application is set to ToolsVersion="3.5" and the TargetFrameworkVersion is v.3.5 we see that when building with TFS 2010 the manifest includes the following dependency<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoPlainText"><span style="mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp; &lt;dependency&gt;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp;&nbsp;&nbsp; &lt;dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"&gt;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" /&gt;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp; &lt;/dependency&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">By including the above dependency we are making .NET Framework 4.0 as a mandatory prerequisite for our application, which is incorrect.<o:p></o:p></p>
<p class="MsoNormal">This is because TFS 2010 build installs MSBUILD 4.0<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">How to repro this:<o:p></o:p></p>
<p class="MsoNormal">====================<o:p></o:p></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">1. Create a windows app using VS 2008 targeting .NET Framework 2.0<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">2. Make sure we set the publish properties correct in the publish properties page of the VS 2008.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">3. Also, sign the clickonce manifests using a test cert.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">4. Make sure we save the project without building.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">Now proceed to the next steps:<o:p></o:p></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">1. Launch the VS 2010 command prompt and use the 4.0 msbuild to build and publish the same app after clearing the publish file created in the TEST A.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">msbuild /target:publish "projectname.vbproj"<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp;<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">2. Once the publish is success, look at the publish folder for the application manifest and in the app manifest we could find the following.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp; &lt;dependency&gt;<br />&nbsp;&nbsp;&nbsp; &lt;dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" /&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />&nbsp; &lt;/dependency&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Workarounds to fix the above problem:<o:p></o:p></p>
<p class="MsoNormal">===================<o:p></o:p></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">1. Use c:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe to publish your project.&nbsp; This should always work.<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">&nbsp;<o:p></o:p></span></p>
<p><span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-bidi-font-size: 10.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: Mangal; mso-bidi-theme-font: minor-bidi;">2. Set &lt;Project ToolsVersion="3.5" to &lt;Project ToolsVersion="4.0" in your *.csproj or *.vbproj file. and Publish using c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If the above are not an option, then you could try the following too:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Change the following lines in the TFSBuild.proj <o:p></o:p></p>
<p class="MsoNormal">From:<o:p></o:p></p>
<p class="MsoNormal">&lt;MSBuild Projects="$(SolutionRoot)/QA/Dev/Src/Discovery.Win.App/Discovery.Win.App.csproj"<br />Properties="PublishDir=$(DropLocation)/$(BuildNumber)/Release/Discovery/;ApplicationVersion=$(VerMajor).$(VerMinor).$(VerBuild).$(VerRevision);InstallUrl=$(DiscoveryInstallUrl)"<br />Targets="Publish" /&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">To:<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&lt;MSBuild ToolsVersion="3.5" Projects="$(SolutionRoot)/QA/Dev/Src/Discovery.Win.App/Discovery.Win.App.csproj"<br />Properties="ClrVersion=2.0.50727.0;PublishDir=$(DropLocation)/$(BuildNumber)/Release/Discovery/;ApplicationVersion=$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision);PublishUrl=$(DiscoveryWinAppPublishUrl);InstallUrl=$(DiscoveryWinAppPublishUrl);Install=false;InstallFrom=Web"<br />Targets="Publish"/&gt;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<o:p><span style="font-family: Calibri; font-size: small;">
<p class="MsoNormal">&nbsp;</p>
</span></o:p></span>
<p class="MsoNormal">&nbsp;</p>
</o:p></p>
<p class="MsoNormal">Thanks,<br />Aditya Hari</p>]]></content:encoded>
    </item>
    <item>
      <title>MSI: Using regasm to register COM may cause resiliency during application launch</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/msi-using-regasm-to-register-com-may-cause-resiliency-during-application-launch</link>
      <pubDate>Mon, 21 Dec 2009 13:57:00 GMT</pubDate>
      <dc:creator><![CDATA[Gauravb]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2009/12/21/msi-using-regasm-to-register-com-may-cause-resiliency-during-application-launch/</guid>
      <description><![CDATA[Building an installer for an application in VS2005. The application consists of several dll projects...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Building an installer for an application in VS2005. The application consists of several dll projects and merge modules with third party references.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>After the installer has been built and the application installed. Launching the application brings up a series of Windows Installer resiliency that continues for a long time before the application is finally launched.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>You are registering<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>your .Net components using the registry table by using regasm to import the registry keys manually into Visual Studio Setup project Registry editor.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Regasm is creating keys under HKCR\CLSID\{GUID}\Implemented Categories that have a null value (not even a default value). <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The property "Always Create" for the registry keys is by default set to False. Since the HKCR\CLSID\{GUID}\Implemented Categories values are null they are not created during install.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>When the application is launched, Windows installer spawns resiliency to find this registry key for each component being registered.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Resolution<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Set the "Always Create" property for the NULL value registry keys to <B style="mso-bidi-font-weight: normal">True</B>.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><SPAN style="mso-ansi-language: EN" lang=EN>Contributor<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Ravi Shankar&nbsp;</SPAN></B><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>]]></content:encoded>
    </item>
    <item>
      <title>Windows Installer 4.0 - MSI that installs data files under System Protected folders does not remove files upon uninstall.</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/windows-installer-4-0-msi-that-installs-data-files-under-system-protected-folders-does-not-remove-files-upon-uninstall</link>
      <pubDate>Mon, 21 Dec 2009 13:54:00 GMT</pubDate>
      <dc:creator><![CDATA[Gauravb]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2009/12/21/windows-installer-4-0-msi-that-installs-data-files-under-system-protected-folders-does-not-remove-files-upon-uninstall/</guid>
      <description><![CDATA[Installing data files (.mdb) into System Protected folders (Program Files, System32 etc..) on...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Installing data files (.mdb) into System Protected folders (Program Files, System32 etc..) on Windows Vista machines as Standard user.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Upon uninstall the data files appear to be removed, however when a new version of the application is installed the older data files are still referenced by the application.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Due to file virtualization on Vista, when an application is launched as a standard user and if the application needs to write files into protected folders such as ProgramFiles it creates a VirtualStore under the Users Appdata folder.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The Virtual Store is not removed upon uninstallation of the application. This is by design.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The recommendation is to not write data files into ProgramFiles folder.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Please see More information section to read more about UAC dev requirements and File virtualization on Vista.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Resolution<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>* Do not use System Protected folders to install Data Files.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>* [CommonAppDataFolder] may be used for such reasons.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>CommonAppDataFolder resolves to the following locations on XP and Vista respectively.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&lt;Root Drive&gt;\Documents and Settings\All Users\Application Data<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&lt;Root Drive&gt;\Program Data<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>More Information<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>New UAC Technologies for Windows Vista - </FONT><A href="https://msdn2.microsoft.com/en-us/library/bb756960.aspx"><FONT color=#0000ff size=3 face=Calibri>https://msdn2.microsoft.com/en-us/library/bb756960.aspx</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>The Windows Vista UAC Dev Requirements document may be downloaded from - </FONT><A href="https://download.microsoft.com/download/5/6/a/56a0ed11-e073-42f9-932b-38acd478f46d/WindowsVistaUACDevReqs.doc"><FONT color=#0000ff size=3 face=Calibri>https://download.microsoft.com/download/5/6/a/56a0ed11-e073-42f9-932b-38acd478f46d/WindowsVistaUACDevReqs.doc</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P><o:p>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: black; mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-ansi-language: EN" lang=EN><FONT size=3 face=Calibri>Contributor <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>: <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Ravi Shankar&nbsp;</FONT></SPAN></B></P></o:p>]]></content:encoded>
    </item>
    <item>
      <title>MSI: Unable to elevate an uninstallation via ARP in Vista</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/msi-unable-to-elevate-an-uninstallation-via-arp-in-vista</link>
      <pubDate>Mon, 21 Dec 2009 13:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Gauravb]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2009/12/21/msi-unable-to-elevate-an-uninstallation-via-arp-in-vista/</guid>
      <description><![CDATA[&nbsp;
MSI built using WiX Installer consists of Actions that require elevation. 
&nbsp;
The...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>MSI built using WiX Installer consists of Actions that require elevation. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The CustomActions are not designed to run under SystemContext. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The installation/uninstallation will have to be done using an Admin command prompt. The uninstallation using Add/Remove Programs will not work due to it being not elevated.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>WiX does not generate a bootrapper setup.exe that can be used with an embedded manifest to say RequestedExecutionLevel = "RequireAdministrator"<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Also uninstallation using Add/Remove Programs will not run elevated and fails.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Resolution<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Use the steps below to change the Uninstall registry key for the package you are installing such that Add/Remove programs will use a Custom Script (executed from an elevated command shell) to uninstall the product.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>1.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Install your package on the system.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>2.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Take a backup of the registry key under <B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Your product}<o:p></o:p></I></B></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>3.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Uninstall your package.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>4.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Set the ARPSYSTEMCOMPONENT property to 1 in property table within your package. For more information https://msdn.microsoft.com/en-us/library/aa367750(VS.85).aspx<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>5.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Import your backup registry keys to registry table within your msi package.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>6.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>In the registry table change the keys to a new guid<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>such as <B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">Software\Microsoft\Windows\CurrentVersion\Uninstall\{Add New GUID}</I></B> and remove <B style="mso-bidi-font-weight: normal">WindowsInstaller=1</B> from <B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Your product}</I></B><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>7.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Add <I style="mso-bidi-font-style: normal">elevate.vbs</I> file in the msi package <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>To create Elevate.vbs<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 12pt"><FONT face=Calibri>Set objSh = CreateObject("Shell.Application")<o:p></o:p></FONT></SPAN></I></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 12pt"><FONT face=Calibri>objSh.ShellExecute "msiexec.exe", "/x {Product Code}" , "", "runas", 1<o:p></o:p></FONT></SPAN></I></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>8.<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>In the registry table modify the "UninstallString" value to cscript "[TARGETDIR]elevate.vbs"<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Now try installing and uninstalling the Msi package. I attached one sample msi package called Scripting_Elevation_setup.txt (rename it to .msi) which runs with elevated privilege from ARP on Vista. Let me know how it goes.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>NOTE: Its highly recommended to set all CustomActions requiring elevation with the TypeNoImpersonate bit such that they run with elevated privilages.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Vista is capable of requesting for elevation when it determines a need for that.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The above is only a workaround that was implemented for the customer since the original developer of the MSI was not available to troubleshoot.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>More Information<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Set No Impersonate to run Custom action on Vista<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><A href="https://msdn.microsoft.com/en-us/library/aa368069(VS.85).aspx"><FONT color=#0000ff size=3 face=Calibri>https://msdn.microsoft.com/en-us/library/aa368069(VS.85).aspx</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Custom action on vista<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><A href="https://blogs.msdn.com/heaths/archive/2006/09/26/Custom-Actions-under-UAC-in-Vista.aspx"><FONT color=#0000ff size=3 face=Calibri>https://blogs.msdn.com/heaths/archive/2006/09/26/Custom-Actions-under-UAC-in-Vista.aspx</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Elevation through Script on Vista<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><A href="https://blogs.msdn.com/aaron_margosis/archive/2007/07/01/scripting-elevation-on-vista.aspx"><FONT color=#0000ff size=3 face=Calibri>https://blogs.msdn.com/aaron_margosis/archive/2007/07/01/scripting-elevation-on-vista.aspx</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri><FONT size=3>&nbsp;</FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: black; mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-ansi-language: EN" lang=EN><FONT size=3>Contributor <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>: <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Ravi Shankar&nbsp;</FONT></SPAN></B></P></FONT></o:p>]]></content:encoded>
    </item>
    <item>
      <title>Native Custom action dll fails to build on x64</title>
      <link>https://docs.microsoft.com/archive/blogs/msiclickonce/native-custom-action-dll-fails-to-build-on-x64</link>
      <pubDate>Mon, 21 Dec 2009 13:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Gauravb]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msiclickonce/2009/12/21/native-custom-action-dll-fails-to-build-on-x64/</guid>
      <description><![CDATA[when you changed the build environment from Win32 to x64 and tried to build the setup project Its...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>when you changed the build environment from Win32 to x64 and tried to build the setup project Its giving Error<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>the Visual studio 2005 always complained the error message "<I style="mso-bidi-font-style: normal">Entry</I> <I style="mso-bidi-font-style: normal">point ‘xxxxxx’ not found in module ‘xxxxxx’ for custom action ‘Primary Output from xxxx’ "</I> and stopped the building.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>-If you are using VS 2008. It will build the Application with couple of warning. But this application will fail during install again<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Cause<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>This is a Limitation of Microsoft Visual studio 2005 - It cannot find correct entry point when You build Native Custom action dll.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>It gives Error during Build<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Limitation of VS 2008 - It passes the Build but still cannot find the entry point correctly. so custom action won’t be successful<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Resolution<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>First you should use an MSI editor (such as Orca.exe) to look at your built MSI - you'll see a series of tables, like a database.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The "CustomAction" table contains all the custom actions in your MSI (some of these are built-in - not all rows here are your own custom actions). Look at the "Target" column - some rows will have a string here similar to this: "_FunctionName@4", where "FunctionName" is the name of the entrypoint of the DLL that this custom action will execute. This is case-sensitive, so don't forget to preserve case. You should update the "Target" column to be just the name of the entrypoint you expect, without the "_" or the "@4". So as an example, you would change "_Install@4" to "Install".<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Once you have learned to alter the MSI the way you want it with Orca (and tested installing it), you can create a post build script which will modify your MSI using SQL statements, so that the custom actions will be re-prioritized for you automatically each time you build it</FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri></FONT></FONT>&nbsp;</P><FONT face=Calibri>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="COLOR: black; mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-ansi-language: EN" lang=EN><FONT size=3>Contributor <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>: <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Ravi Shankar&nbsp;</FONT></SPAN></B></P><o:p></o:p></FONT>]]></content:encoded>
    </item>
  </channel>
</rss>