Advertisement
Guest User

EXE wrapper MSI template

a guest
May 2nd, 2013
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.95 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  3.   <?define ProductManufacturer = "ACME, Inc." ?>
  4.   <?define ProductName = "Dynamite" ?>
  5.   <?define ProductVersion = "0.0.0.1" ?>
  6.   <?define ProductHomeURL = "http://www.ex-parrot.com/pete/upside-down-ternet.html" ?>
  7.   <?define ProductID = "{01234567-8901-2345-6789-012345678901}" ?>
  8.   <?define ProductUpgradeCode = "{23456789-0123-4567-8901-234567890123}" ?>
  9.   <?define ProductLanguage = "1033" ?>
  10.   <?define ProductPlatform = "x86" ?>
  11.   <?define ProductInstaller = "Dynamite-setup.exe" ?>
  12.   <?define ProductInstallerParams = "/Silent_install_parameters /go_here" ?>
  13.   <?define ProductUninstallerDirectory = "INSTALL_BASE_DIR" ?>
  14.   <?define ProductUninstallerProgram = "uninstall.exe" ?>
  15.   <?define ProductUninstallerParams = "/Silent_uninstall_parameters /go_here" ?>
  16.   <Product Id="$(var.ProductID)" Language="$(var.ProductLanguage)" Manufacturer="$(var.ProductManufacturer)" Name="$(var.ProductName)" UpgradeCode="$(var.ProductUpgradeCode)" Version="$(var.ProductVersion)">
  17.     <Package Compressed="yes" Description="$(var.ProductName) $(var.ProductVersion)" InstallerVersion="400" Keywords="Installer,MSI,Database,$(var.ProductName)" Languages="$(var.ProductLanguage)" Manufacturer="$(var.ProductManufacturer)" Platform="$(var.ProductPlatform)" ReadOnly="no" />
  18.     <Binary Id="APP_SETUP_EXE" SourceFile="$(var.ProductInstaller)" />
  19.     <CustomAction Id="APP_SETUP_EXECUTE" BinaryKey="APP_SETUP_EXE" ExeCommand="$(var.ProductInstallerParams)" Execute="deferred" Impersonate="no" Return="check" />
  20.     <CustomAction Id="APP_UNINS_EXECUTE" Directory="$(var.ProductUninstallerDirectory)" ExeCommand="&quot;[$(var.ProductUninstallerDirectory)]$(var.ProductUninstallerProgram)&quot; $(var.ProductUninstallerParams)" Execute="deferred" Impersonate="no" Return="check">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</CustomAction>
  21.     <Feature Id="DefaultFeature" Description="Default Feature" Display="hidden" Level="1" Title="$(var.ProductName) $(var.ProductVersion)" />
  22.     <Media Id="1" Cabinet="APP_DATA_1.cab" EmbedCab="yes" CompressionLevel="high" />
  23.     <Property Id="ALLUSERS" Value="1" />
  24.     <Property Id="ARPNOMODIFY" Value="1" />
  25.     <Property Id="ARPNOREPAIR" Value="1" />
  26.     <!-- Property below controls whether the MSI package shows up under Add/Remove Programs / Programs and Features -->
  27.     <Property Id="ARPSYSTEMCOMPONENT" Value="1" />
  28.     <Property Id="ARPURLINFOABOUT" Value="$(var.ProductHomeURL)" />
  29.     <Property Id="LIMITUI" Value="1" />
  30.     <Property Id="NOCOMPANYNAME" Value="1" />
  31.     <Property Id="NOUSERNAME" Value="1" />
  32.     <InstallExecuteSequence>
  33.       <Custom Action="APP_SETUP_EXECUTE" Before="CreateFolders">NOT REMOVE~="ALL"</Custom>
  34.       <Custom Action="APP_UNINS_EXECUTE" Before="RemoveFiles">Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
  35.       <RemoveRegistryValues Sequence="4999" />
  36.       <RemoveExistingProducts Before="InstallInitialize" />
  37.     </InstallExecuteSequence>
  38.     <UI />
  39.     <Upgrade Id="$(var.ProductUpgradeCode)">
  40.       <UpgradeVersion Property="UPGRADE_CURRENT_CODE" Maximum="$(var.ProductVersion)" IncludeMaximum="no" />
  41.     </Upgrade>
  42.     <Directory Id="TARGETDIR" Name="SourceDir">
  43.       <Directory Id="ProgramFilesFolder">
  44.         <Directory Id="INSTALL_BASE_DIR" Name="Dynamite">
  45.           <Component Id="comp.INSTALL_BASE_DIR" KeyPath="yes" Guid="45678901-2345-6789-0123-456789012345" Feature="DefaultFeature">
  46.             <RemoveFolder Id="rf.INSTALL_BASE_DIR" On="uninstall" />
  47.           </Component>
  48.           <Component Id="comp.REMOVE_UNINSTALL_ENTRY" Guid="67890123-4567-8901-2345-678901234567" Location="either" KeyPath="yes" Feature="DefaultFeature">
  49.             <RemoveRegistryKey Action="removeOnInstall" Id="UninstallKey" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dynamite" Root="HKLM" />
  50.           </Component>
  51.         </Directory>
  52.       </Directory>
  53.     </Directory>
  54.   </Product>
  55. </Wix>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement