我在单个 MSI 中有一个.exe
文件和.dll
(IE 插件)。当用户第一次安装它时,两个文件都将安装,并且在指定文件夹下的程序文件中,它将创建.exe
和.dll
. 现在我只想为.dll
(IE 插件)提供更新。当我使用更新文件再次生成 MSI 时,.dll
如何省略.exe
不加载到 MSI 中的文件。由于.exe
文件非常大,用户需要花费大量时间来更新 MSI。有没有办法.exe
在新生成的 msi 中省略组件,或者请建议我另一种方法来实现这一点。
Product.wxs :
<?xml version="1.0" encoding="UTF-8"?>
<?define ProductVersion = "0.0.4"?>
<?define ProductUpgradeCode = "d3170abf-b41c-4274-a3a0-85576052f35c"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="saranSample" Language="1033" Version="$(var.ProductVersion)" Manufacturer="example" UpgradeCode="$(var.ProductUpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of product is already installed." AllowSameVersionUpgrades="no" AllowDowngrades="no" />
<MediaTemplate EmbedCab="yes" />
<Upgrade Id="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)" OnlyDetect="yes"
Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Minimum="0.0.0" Maximum="$(var.ProductVersion)" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
</Upgrade>
<InstallExecuteSequence>
<Custom Action="Filecleaner" After="InstallFinalize"></Custom>
</InstallExecuteSequence>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="saranSample_$(var.ProductVersion)">
<Component Id="exeFiles" Guid="12345678-1234-1234-1234-222222222222">
<File Id="exe" Source="$(sys.CURRENTDIR)npp.7.5.7.Installer.exe" KeyPath="yes"/>
</Component>
<Component Id="dllFiles" Guid="12345678-1234-1234-1234-222222222223">
<File Id="dll" Source="$(sys.CURRENTDIR)saran.dll" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="saranSample" Level="1">
<ComponentRef Id="exeFiles"/>
<ComponentRef Id="dllFiles"/>
</Feature>