Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version='1.0'?>
- <?define PrevProductVersion = "1.0.0"?> <!-- Match previous exe version -->
- <?define ProductVersion = "2.3.10"?> <!-- Match exe version -->
- <?define ExeSourceFile = "openvpn-install-2.3.10-I602-x86_64.exe"?> <!-- Match new .exe -->
- <?define ProductCode = "9dc4937b-e23c-42a3-a344-86b78f61f8d1"?> <!-- Regenerate for new upgrade -->
- <?define ProductUpgradeCode = "407cfa7d-b3fc-48a9-abfc-2088070685a7"?> <!-- When upgrading, move previous ProductCode here -->
- <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
- <Product Id='*'
- UpgradeCode="$(var.ProductUpgradeCode)"
- Name='MSI wrapper for $(var.ExeSourceFile)'
- Language='1033'
- Version='$(var.ProductVersion)'
- Manufacturer='Mycompany'>
- <Package Id='*'
- Description='MSI wrapper for $(var.ExeSourceFile)'
- InstallerVersion='200'
- Compressed='yes'
- InstallScope="perMachine"
- Platform="x64" />
- <Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
- <Property Id='ARPCONTACT'>support@corp.anonit.net</Property>
- <Property Id='ARPCOMMENTS'>NSIS MSI Wrapper</Property>
- <Property Id='ARPNOMODIFY'>1</Property>
- <Directory Id='TARGETDIR' Name='SourceDir'>
- <Directory Id="TempFolder">
- <Directory Id="INSTALLLOCATION" Name="ovpntmpdir">
- <Component Id='MyComponent' DiskId='1' Guid='58d5303f-0fb9-4c4d-a3e3-555c84bfc7bb' Win64="yes">
- <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"
- />
- <CustomAction
- Id='RunUninstallNSIS_set'
- Property='RunUninstallNSIS'
- Value='"[ProgramFiles64Folder]\OpenVPN\Uninstall.exe" /S'
- Execute='immediate'
- />
- <CustomAction
- Id="RunUninstallNSIS"
- BinaryKey="WixCA"
- DllEntry="CAQuietExec64"
- Execute="deferred"
- Return="ignore"
- Impersonate="no"
- />
- <InstallExecuteSequence>
- <Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL" AND NOT
- UPGRADEPRODUCTCODE</Custom>
- <Custom Action="RunUninstallNSIS_set" After="CostFinalize">REMOVE~="ALL" AND NOT
- UPGRADINGPRODUCTCODE</Custom>
- <Custom Action="RunUninstallNSIS" Before="InstallFinalize">REMOVE~="ALL" AND NOT
- UPGRADINGPRODUCTCODE</Custom>
- <RemoveExistingProducts After="InstallFinalize" />
- </InstallExecuteSequence>
- </Product>
- </Wix>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement