[wix-users] Unable to Uninstall Patch

Rob Mensching rob at firegiant.com
Fri Jun 1 09:27:06 PDT 2018


https://msdn.microsoft.com/en-us/library/windows/desktop/aa372102(v=vs.85).aspx

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Ven H via wix-users
Sent: Friday, June 1, 2018 6:22 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: Re: [wix-users] Unable to Uninstall Patch

So, I think I need to explain a little more. I have an MSI which has a text file in a component and SqlScript element in a different component. In this SqlScript element, I am creating a table with 2 columns. I install this MSI and the text file is created and the SqlScript is executed to create the table with 2 columns in the Database.

Now, I am adding another SqlScript element (here I am creating another table with 2 columns) in a new component and also making a slight change in the sample text file. With this, I create the patch using the Patch Creation Properties approach. The patch gets created successfully and also gets installed. After installation, I can see the new table created and the sample text file modified. But now, when I go to Installed Updates, the Uninstall option is missing for this patch, even though, I specify AllowRemoval=yes.

Now, instead of adding another SqlScript element, if I just modify the existing SqlScript (I mean the binary sql file content), by altering the table or adding another create table statement inside it, the patch doesn't seem to apply these changes, although, now the Uninstall option is available and I can uninstall the patch. I am not able to understand this.

So, I have a couple of questions.

1. Why does the Uninstall option disappear for a Patch when a new Component is added? I am actually not removing a component, but adding one. So, I am not sure, if I am breaking the Component rules.

2. How do we Patch SqlScript elements? It is possible that, after installation, the developer will make a small change in one of the sql files. For this small change, I don't want to do a full upgrade.

Please help.


Regards,
Venkatesh

On Fri, Jun 1, 2018 at 4:28 PM, Ven H <venh.123 at gmail.com> wrote:

> I am building a Patch using the Patch Creation Properties. I have a 
> Patch.wxs in which there is a PatchMetadata element with 
> AllowRemoval="yes". Even then the Patch doesn't give me the option to 
> uninstall in the Installed Updates. Can any one please help?
>
> FYI, please find the Patch.wxs mark up below.
>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
>   <PatchCreation WholeFilesOnly="yes" CleanWorkingFolder="yes"
> OutputPath="patch.pcp" Id="224C316C-5894-4771-BABF-21A3AC1F75FF">
>     <PatchInformation Description="!(loc.PatchDescription)"
> Comments="!(loc.PatchDescription)" Manufacturer="$(var.Manufacturer)"
> Languages="!(loc.LANG)" ShortNames="no" Compressed="yes"/>
>     <PatchMetadata Description="!(loc.PatchDescription)"
> ManufacturerName="$(var.Manufacturer)" MoreInfoURL="URL"
> *AllowRemoval="yes"* Classification="Update" DisplayName="!(loc.PatchDisplayName)"
> TargetProductName="$(var.ProductName)"/>
>     <Family MediaSrcProp="Sample" SequenceStart="5000" DiskId="5000"
> Name="Sample">
>       <UpgradeImage SourceFile="Path\1.0.1\admin\New.msi"
> Id="SampleUpgrade">
>         <TargetImage Order="2" IgnoreMissingFiles="no"
> SourceFile="Path\1.0.0\admin\old.msi" Id="SampleTarget"/>
>       </UpgradeImage>
>     </Family>
>     <PatchSequence Supersede="yes" PatchFamily="SamplePatchFamily"
> Sequence="1.0.0.0"/>
>   </PatchCreation>
> </Wix>
>
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list