简体   繁体   English

WIX安装程序以更新我的程序

[英]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. 有必要更新组件2并添加组件3。不应将组件1更新为现在的版本。 How to implement it with new msi? 如何用新的msi实施它?

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: 您可以使用补丁程序 (如果您只想包含这些“差异”,而无需comp1)来完成此操作,但是它将创建.msp文件而不是.msi次要升级 -要在此处升级文件,您可以设置一些安装选项(但是您必须使用msiexec示例:

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

Here you can change REINSTALL and REINSTALLMODE property. 在这里,您可以更改REINSTALLREINSTALLMODE属性。

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 !!). 我更喜欢Patch选项,我给了您指向教程的链接,现在从我这里得到一些东西,要获取.msp文件,您需要2个文件夹,一个带有旧版本,第二个带有新版本(每个文件都包含目录),然后您必须创建这两个目录的安装程序-设置不同的路径( 不能是同一文件夹,因为您不会使用.msi文件来获取差异,而要使用 .wixpdb !!)。 Next you get code from tutorial ( patch.wxs code). 接下来,您将从教程中获取代码( patch.wxs代码)。 In <PatchFamily> element you use <ComponentRef> element to choose which of components should be checked. <PatchFamily>元素中,使用<ComponentRef>元素选择应检查的组件。 If there are some differences - it will be added to .msp file. 如果存在一些差异,它将被添加到.msp文件中。

You can use Orca.exe to check what's in .msp file. 您可以使用Orca.exe检查.msp文件中的内容。 First you have to open installer (without changes) and get form menu Transform -> View Patch... And that's it! 首先,您必须打开安装程序(无需更改),然后获取表单菜单Transform-> View Patch ...就是这样!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM