anonit

Openvpn-install-2.3.10-i602-x86_64.wxs

Feb 19th, 2016
740
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version='1.0'?>
  2. <?define PrevProductVersion = "1.0.0"?> <!-- Match previous exe version -->
  3. <?define ProductVersion = "2.3.10"?> <!-- Match exe version -->
  4. <?define ExeSourceFile = "openvpn-install-2.3.10-I602-x86_64.exe"?> <!-- Match new .exe -->
  5. <?define ProductCode = "9dc4937b-e23c-42a3-a344-86b78f61f8d1"?> <!-- Regenerate for new upgrade -->
  6. <?define ProductUpgradeCode = "407cfa7d-b3fc-48a9-abfc-2088070685a7"?> <!-- When upgrading, move previous ProductCode here -->
  7.  
  8.  
  9. <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  10. <Product Id='*'
  11. UpgradeCode="$(var.ProductUpgradeCode)"
  12. Name='MSI wrapper for $(var.ExeSourceFile)'
  13. Language='1033'
  14. Version='$(var.ProductVersion)'
  15. Manufacturer='Mycompany'>
  16. <Package Id='*'
  17. Description='MSI wrapper for $(var.ExeSourceFile)'
  18. InstallerVersion='200'
  19. Compressed='yes'
  20. InstallScope="perMachine"
  21. Platform="x64" />
  22. <Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
  23.  
  24. <Property Id='ARPCONTACT'>support@corp.anonit.net</Property>
  25. <Property Id='ARPCOMMENTS'>NSIS MSI Wrapper</Property>
  26. <Property Id='ARPNOMODIFY'>1</Property>
  27.  
  28. <Directory Id='TARGETDIR' Name='SourceDir'>
  29. <Directory Id="TempFolder">
  30. <Directory Id="INSTALLLOCATION" Name="ovpntmpdir">
  31. <Component Id='MyComponent' DiskId='1' Guid='58d5303f-0fb9-4c4d-a3e3-555c84bfc7bb' Win64="yes">
  32. <File Id="File0" Name="$(var.ExeSourceFile)" Source="$(var.ExeSourceFile)"/>
  33. </Component>
  34. </Directory>
  35. </Directory>
  36. </Directory>
  37.  
  38. <Upgrade Id="$(var.ProductUpgradeCode)">
  39. <UpgradeVersion Minimum="$(var.ProductVersion)"
  40. IncludeMinimum="no"
  41. OnlyDetect="yes"
  42. Language="1033"
  43. Property="NEWPRODUCTFOUND" />
  44. <UpgradeVersion Minimum="$(var.PrevProductVersion)"
  45. IncludeMinimum="yes"
  46. Maximum="$(var.ProductVersion)"
  47. IncludeMaximum="no"
  48. Language="1033"
  49. Property="UPGRADEFOUND" />
  50. </Upgrade>
  51.  
  52. <!-- <Property Id="ARPSYSTEMCOMPONENT" Value="1" /> -->
  53.  
  54. <Feature Id='InstallFeature' Title='Install Feature' Level='1'>
  55. <ComponentRef Id='MyComponent' />
  56. </Feature>
  57.  
  58. <!-- Prevent downgrading -->
  59. <CustomAction Id="PreventDowngrading" Error="Newer version already installed." />
  60.  
  61. <InstallUISequence>
  62. <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
  63. </InstallUISequence>
  64.  
  65. <!-- Run Action -->
  66. <CustomAction
  67. Id="RunWrapExe"
  68. Return="ignore"
  69. Execute="deferred"
  70. FileKey="File0"
  71. ExeCommand="$(var.ExeSourceFile) /S"
  72. HideTarget="no"
  73. Impersonate="no"
  74. />
  75.  
  76. <CustomAction
  77. Id='RunUninstallNSIS_set'
  78. Property='RunUninstallNSIS'
  79. Value='"[ProgramFiles64Folder]\OpenVPN\Uninstall.exe" /S'
  80. Execute='immediate'
  81. />
  82. <CustomAction
  83. Id="RunUninstallNSIS"
  84. BinaryKey="WixCA"
  85. DllEntry="CAQuietExec64"
  86. Execute="deferred"
  87. Return="ignore"
  88. Impersonate="no"
  89. />
  90. <InstallExecuteSequence>
  91. <Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL" AND NOT
  92. UPGRADEPRODUCTCODE</Custom>
  93. <Custom Action="RunUninstallNSIS_set" After="CostFinalize">REMOVE~="ALL" AND NOT
  94. UPGRADINGPRODUCTCODE</Custom>
  95. <Custom Action="RunUninstallNSIS" Before="InstallFinalize">REMOVE~="ALL" AND NOT
  96. UPGRADINGPRODUCTCODE</Custom>
  97. <RemoveExistingProducts After="InstallFinalize" />
  98. </InstallExecuteSequence>
  99. </Product>
  100. </Wix>
RAW Paste Data