Alex Chan
Alex Chan

Reputation: 35

WIX installer for update my program

installed the program

 <Product Id="111" Name="111" Language="1049" Version="1.0.0.0" Manufacturer="11" UpgradeCode="111" Codepage="1251">
    <Package InstallerVersion="200" Compressed="yes" />
     <DirectoryRef Id="Messages">
      <Component Id="1">
        <File Id="1" Name="1" Source="Messages\1.xml" DiskId="1" KeyPath="yes" />
      </Component>
      <Component Id="2">
        <File Id="2" Name="2" Source="Messages\2.xml" DiskId="1" KeyPath="yes" />
      </Component>

It is necessary to update the component 2 and add the component 3. Component 1 should not have been updated to be what is now. How to implement it with new msi?

Upvotes: 0

Views: 245

Answers (1)

Buzka91
Buzka91

Reputation: 399

You can do it using Patch (if you only wanna include these 'differences' - without comp1) but it will create .msp file not .msi or Minor Upgrade - to upgrade files here you can set some options to install (but you have to use msiexec example:

msiexec /i msiname.msi REINSTALL=ALL REINSTALLMODE=vomus

Here you can change REINSTALL and REINSTALLMODE property.

I would prefer Patch option i gave you link to tutorial, now something from me, to get .msp file you need 2 folders, one with old version, and second with new version (both directories with every file), then you have to create installers for these 2 directories - set different paths (it can't be same folder, because you won't be using .msi files to get differences, but .wixpdb!!). Next you get code from tutorial (patch.wxs code). In <PatchFamily> element you use <ComponentRef> element to choose which of components should be checked. If there are some differences - it will be added to .msp file.

You can use Orca.exe to check what's in .msp file. First you have to open installer (without changes) and get form menu Transform -> View Patch... And that's it!

Upvotes: 1

Related Questions