WiX Wrapper Exe installer
2015-11-26 16:06
661 查看
WiX Wrapper Exe installer
使用WiX来封装Exe成为MSI文件
https://github.com/pennmanor/wix-wrapper/blob/master/owncloud.wxs
<?xml version='1.0'?>
<?define ProductVersion = "2.0.2"?> <!-- Match ownCloud Client version -->
<?define PrevProductVersion = "2.0.1"?> <!-- Match previous ownCloud Client version -->
<?define ExeSourceFile = "ownCloud-2.0.2.5569-setup.exe"?> <!-- Match new .exe -->
<?define ProductCode = "87CA6CC7-4F67-4663-974A-53BA46DA8E34"?> <!-- Regenerate for new upgrade -->
<?define ProductUpgradeCode = "5a4f6818-b8b2-4fda-b43c-9959a6d734ad"?> <!-- When upgrading, move previous ProductCode here -->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='*'
UpgradeCode="$(var.ProductUpgradeCode)"
Name='ownCloud Sync Client'
Language='1033'
Version='$(var.ProductVersion)'
Manufacturer='Penn Manor ownCloud'>
<Package Id='$(var.ProductCode)'
Description='ownCloud Client $(var.ProductVersion)'
InstallerVersion='200'
Compressed='yes' />
<Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id="TempFolder">
<Directory Id="INSTALLLOCATION" Name="~_tmpdir">
<Component Id='MyComponent' DiskId='1' Guid='B3514243-DFB8-4BB1-8495-ED6153468361'>
<File Id="File0" Name="$(var.ExeSourceFile)" Source="$(var.ExeSourceFile)" />
</Component>
</Directory>
</Directory>
</Directory>
<Upgrade Id="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033"
Property="NEWPRODUCTFOUND" />
<UpgradeVersion Minimum="$(var.PrevProductVersion)"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Language="1033"
Property="UPGRADEFOUND" />
</Upgrade>
<Property Id="ARPSYSTEMCOMPONENT" Value="1" />
<Feature Id='InstallFeature' Title='Install Feature' Level='1'>
<ComponentRef Id='MyComponent' />
</Feature>
<!-- Prevent downgrading -->
<CustomAction Id="PreventDowngrading" Error="Newer version already installed." />
<InstallUISequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
</InstallUISequence>
<!-- Run Action -->
<CustomAction Id="RunWrapExe"
Return="ignore"
Execute="deferred"
FileKey="File0"
ExeCommand="$(var.ExeSourceFile) /S"
HideTarget="no"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
<Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL"</Custom>
<RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
</Product>
</Wix>
使用WiX来封装Exe成为MSI文件
https://github.com/pennmanor/wix-wrapper/blob/master/owncloud.wxs
<?xml version='1.0'?>
<?define ProductVersion = "2.0.2"?> <!-- Match ownCloud Client version -->
<?define PrevProductVersion = "2.0.1"?> <!-- Match previous ownCloud Client version -->
<?define ExeSourceFile = "ownCloud-2.0.2.5569-setup.exe"?> <!-- Match new .exe -->
<?define ProductCode = "87CA6CC7-4F67-4663-974A-53BA46DA8E34"?> <!-- Regenerate for new upgrade -->
<?define ProductUpgradeCode = "5a4f6818-b8b2-4fda-b43c-9959a6d734ad"?> <!-- When upgrading, move previous ProductCode here -->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='*'
UpgradeCode="$(var.ProductUpgradeCode)"
Name='ownCloud Sync Client'
Language='1033'
Version='$(var.ProductVersion)'
Manufacturer='Penn Manor ownCloud'>
<Package Id='$(var.ProductCode)'
Description='ownCloud Client $(var.ProductVersion)'
InstallerVersion='200'
Compressed='yes' />
<Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id="TempFolder">
<Directory Id="INSTALLLOCATION" Name="~_tmpdir">
<Component Id='MyComponent' DiskId='1' Guid='B3514243-DFB8-4BB1-8495-ED6153468361'>
<File Id="File0" Name="$(var.ExeSourceFile)" Source="$(var.ExeSourceFile)" />
</Component>
</Directory>
</Directory>
</Directory>
<Upgrade Id="$(var.ProductUpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033"
Property="NEWPRODUCTFOUND" />
<UpgradeVersion Minimum="$(var.PrevProductVersion)"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Language="1033"
Property="UPGRADEFOUND" />
</Upgrade>
<Property Id="ARPSYSTEMCOMPONENT" Value="1" />
<Feature Id='InstallFeature' Title='Install Feature' Level='1'>
<ComponentRef Id='MyComponent' />
</Feature>
<!-- Prevent downgrading -->
<CustomAction Id="PreventDowngrading" Error="Newer version already installed." />
<InstallUISequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
</InstallUISequence>
<!-- Run Action -->
<CustomAction Id="RunWrapExe"
Return="ignore"
Execute="deferred"
FileKey="File0"
ExeCommand="$(var.ExeSourceFile) /S"
HideTarget="no"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
<Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL"</Custom>
<RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
</Product>
</Wix>
相关文章推荐
- PowerShell批量安装msi后辍软件的方法
- VC++创建msi文件的方法
- 【十五分钟Talkshow】如何善用你的.NET开发环境
- office2007安装提示“Windows Installer 服务不能更新一个或多个受保护的Windows文件
- 如何在InstallShield的MSI工程中调用Merge Module的Custom Action
- WINDOWS INSTALLER无法启动解决方法
- office2007无法卸载
- Apache+php+mysql环境搭建
- 用电脑看微信朋友圈
- 利用组策略部署软件全攻略之一
- 無法啟動Windows Installer服務解決方法
- MSI Windows Installer 被破坏后引起软件无法安装的解决
- [Oracle Client and Net Service]Oracle Client安装及Net Service的配置
- silverlight无法安装的解决办法
- 用于线性代数的Ruby模块linalg 0.32发布收藏(来自ruby-talk)
- air打包部署相关
- Ipod Touch1.1.3破解,3分钟
- 制作安装包
- JIRA与Confluence破解集成全过程
- oracle 9i 彻底删除方法