VirtualBox.wxs revision 1ab3b6ebbcab4918a5a611bb2f020fc650c70544
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync VirtualBox Windows Installation Script (WiX)
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Copyright (C) 2014 Oracle Corporation
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync This file is part of VirtualBox Open Source Edition (OSE), as
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync available from http://www.virtualbox.org. This file is free software;
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync you can redistribute it and/or modify it under the terms of the GNU
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync General Public License (GPL) as published by the Free Software
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Foundation, in version 2 as it comes in the "COPYING" file of the
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync VirtualBox OSE distribution. VirtualBox OSE is distributed in the
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <!-- The merge module file names -->
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Language="!(loc.LANG)"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Codepage="1252"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Manufacturer="$(env.VBOX_VENDOR)">
990f120996c99b7f384c0d84f7465cd6f2d77f3dvboxsync Keywords="Installer"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Comments="$(env.VBOX_PRODUCT) installation package"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Compressed="yes"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Manufacturer="$(env.VBOX_VENDOR)"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync InstallerVersion="200"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync InstallPrivileges="elevated"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <!-- Global properties -->
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Install the product for all users on the system -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- VirtualBox properties -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="VBOX_INSTALLDESKTOPSHORTCUT" Value="1"></Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="VBOX_INSTALLQUICKLAUNCHSHORTCUT" Value="1"></Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1"></Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Property Id="VBOX_STARTVBOX" Value="1"></Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Make sure installation will not start on anything other but the NT family -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync VersionNT64
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Condition>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync NOT VersionNT64
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Condition>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Condition>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Condition>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Detect old innotek installation -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Property>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync NOT VBOXINNOTEK
ecb074924ed761fe89e91113482db5b7374441b0vboxsync </Condition>
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- *************************** Upgrade packages only ******************************* -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
ecb074924ed761fe89e91113482db5b7374441b0vboxsync IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
ecb074924ed761fe89e91113482db5b7374441b0vboxsync (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
ecb074924ed761fe89e91113482db5b7374441b0vboxsync IncludeMaximum = no only finds those below the Maximum).
ecb074924ed761fe89e91113482db5b7374441b0vboxsync OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
ecb074924ed761fe89e91113482db5b7374441b0vboxsync only change files in the package -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" OnlyDetect="no" />
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- Flag is set if the install will trigger an upgrade of an existing install -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- The product's icon table -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <!-- The media/binary IDs -->
ecb074924ed761fe89e91113482db5b7374441b0vboxsync <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <Media Id="2" Cabinet="common.cab" EmbedCab="no" CompressionLevel="high" />
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <!-- Custom actions -->
990f120996c99b7f384c0d84f7465cd6f2d77f3dvboxsync <!-- Figure out where a previous installation was, if any -->
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync </Property>
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
7f8a04081173dbe3c72bddd0ffeb237e7f9070b0vboxsync Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
<RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
<CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
<RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
<CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]\VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
<CustomAction Id="ca_CheckSerial" BinaryKey="VBoxInstallHelper" DllEntry="CheckSerial" Impersonate="no"/>
<CustomAction Id="ca_InstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
<CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
<CustomAction Id="ca_UninstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
<CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
<Merge Id="msm_VBoxApp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeApp)" DiskId="1" />
<Merge Id="msm_VBoxUSB" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeUSB)" DiskId="1" />
<Merge Id="msm_VBoxNetworkFlt" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkFlt)" DiskId="1" />
<Merge Id="msm_VBoxNetworkAdp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp)" DiskId="1" />
<Merge Id="msm_VBoxPython" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergePython)" DiskId="1" />
<Component Id="cp_StartMenuVBox" Guid="C2DC321A-CE63-40EE-8A98-724DF8BD12FB" Win64="$(var.Property_Win64)">
<Shortcut Id="sc_StartMenuVBox" Directory="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
<Component Id="cp_DesktopShortcut" Guid="668F8A1A-F5CE-48B3-BB1A-3042EE27B279" Win64="$(var.Property_Win64)">
<Shortcut Id="sc_DesktopVBox" Directory="DesktopFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
<Component Id="cp_QuickLaunchVBox" Guid="CC19E026-938A-41CB-8E77-3F33296244B6" Win64="$(var.Property_Win64)">
<Shortcut Id="sc_QuickLaunchVBox" Directory="dir_QuicklaunchFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
Description="!(loc.VB_App)"
Description="!(loc.VB_USBDriver)"
Description="!(loc.VB_Network)"
Description="!(loc.VB_NetFltDriver)"
Description="!(loc.VB_NetAdpDriver)"
Description="!(loc.VB_Python)"
To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>"
<Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR) AND (NOT EXISTINGINSTALLDIR)]]></Custom>
<Custom Action="ca_DefaultTargetDir" Before="FileCost" ><![CDATA[NOT Installed AND (NOT INSTALLDIR) AND EXISTINGINSTALLDIR]]></Custom>
<Custom Action="ca_InstallBrandingArgs" Before="ca_InstallBranding" ><![CDATA[NOT REMOVE]]></Custom>
<Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>