VirtualBox.wxs revision a7cb1a0bfefdfcfa6d366ce52826f5669f302e1f
af062818b47340eef15700d2f0211576ba3506eevboxsync VirtualBox Windows Installation Script (WiX)
af062818b47340eef15700d2f0211576ba3506eevboxsync Copyright (C) 2014 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
af062818b47340eef15700d2f0211576ba3506eevboxsync<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
af062818b47340eef15700d2f0211576ba3506eevboxsync xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync <!-- The merge module file names -->
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync <?define Property_VBoxMergeCOM32On64 = "$(env.VBOX_WIN_INST_MERGE_COM32ON64)" ?>
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync <?define Property_VBoxMergeNetworkLwf = "$(env.VBOX_WIN_INST_MERGE_NETLWF)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync <?define Property_VBoxMergeNetworkAdp6 = "$(env.VBOX_WIN_INST_MERGE_NETADP6)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
af062818b47340eef15700d2f0211576ba3506eevboxsync UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
af062818b47340eef15700d2f0211576ba3506eevboxsync Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
af062818b47340eef15700d2f0211576ba3506eevboxsync Language="!(loc.LANG)"
af062818b47340eef15700d2f0211576ba3506eevboxsync Codepage="1252"
af062818b47340eef15700d2f0211576ba3506eevboxsync Manufacturer="$(env.VBOX_VENDOR)">
af062818b47340eef15700d2f0211576ba3506eevboxsync Keywords="Installer"
af062818b47340eef15700d2f0211576ba3506eevboxsync Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
af062818b47340eef15700d2f0211576ba3506eevboxsync Comments="$(env.VBOX_PRODUCT) installation package"
af062818b47340eef15700d2f0211576ba3506eevboxsync Compressed="yes"
af062818b47340eef15700d2f0211576ba3506eevboxsync Manufacturer="$(env.VBOX_VENDOR)"
af062818b47340eef15700d2f0211576ba3506eevboxsync InstallerVersion="200"
af062818b47340eef15700d2f0211576ba3506eevboxsync InstallPrivileges="elevated"
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Global properties -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Default property for network adapter type -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="NETWORKTYPE" Value="NDIS6" Secure="yes"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Force NDIS5 on pre-Vista -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <SetProperty Id="NETWORKTYPE" After="CostFinalize" Value="NDIS5"><![CDATA[VersionNT < 600]]></SetProperty>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Install the product for all users on the system -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- VirtualBox properties -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="VBOX_INSTALLDESKTOPSHORTCUT" Value="1" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="VBOX_INSTALLQUICKLAUNCHSHORTCUT" Value="1" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Make sure installation will not start on anything other but the NT family -->
af062818b47340eef15700d2f0211576ba3506eevboxsync VersionNT64
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>
af062818b47340eef15700d2f0211576ba3506eevboxsync NOT VersionNT64
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>
af062818b47340eef15700d2f0211576ba3506eevboxsync NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Detect old innotek installation -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync </Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync NOT VBOXINNOTEK
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- *************************** Upgrade packages only ******************************* -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
af062818b47340eef15700d2f0211576ba3506eevboxsync IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
af062818b47340eef15700d2f0211576ba3506eevboxsync (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
af062818b47340eef15700d2f0211576ba3506eevboxsync IncludeMaximum = no only finds those below the Maximum).
af062818b47340eef15700d2f0211576ba3506eevboxsync OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
af062818b47340eef15700d2f0211576ba3506eevboxsync only change files in the package -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="no" OnlyDetect="no" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Flag is set if the install will trigger an upgrade of an existing install -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- The product's icon table -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- The media/binary IDs -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <Media Id="2" Cabinet="common.cab" EmbedCab="no" CompressionLevel="high" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Custom actions -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Figure out where a previous installation was, if any -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
af062818b47340eef15700d2f0211576ba3506eevboxsync Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
af062818b47340eef15700d2f0211576ba3506eevboxsync </Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
af062818b47340eef15700d2f0211576ba3506eevboxsync Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
af062818b47340eef15700d2f0211576ba3506eevboxsync </Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_UninstallTAPInstances" BinaryKey="VBoxInstallHelper"
af062818b47340eef15700d2f0211576ba3506eevboxsync DllEntry="UninstallTAPInstances" Execute="deferred" Return="check" Impersonate="no"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Detect old Sun installation -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!-- Force a manual uninstall of an already installed Sun VirtualBox version first -->
af062818b47340eef15700d2f0211576ba3506eevboxsync <!--<Property Id="VBOXSUN">
af062818b47340eef15700d2f0211576ba3506eevboxsync <RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync </Property>
af062818b47340eef15700d2f0211576ba3506eevboxsync <Condition Message="!(loc.SunFound)">
af062818b47340eef15700d2f0211576ba3506eevboxsync NOT VBOXSUN
af062818b47340eef15700d2f0211576ba3506eevboxsync </Condition>-->
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]\VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_CheckSerial" BinaryKey="VBoxInstallHelper" DllEntry="CheckSerial" Impersonate="no"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_InstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <CustomAction Id="ca_UninstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
af062818b47340eef15700d2f0211576ba3506eevboxsync <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_VBoxCOM32On64" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeCOM32On64)" 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_VBoxNetworkLwf" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkLwf)" DiskId="1" />
<Merge Id="msm_VBoxNetworkAdp6" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp6)" 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>"
<RemoveExistingProducts After="InstallValidate"><![CDATA[PREVIOUSVERSIONSINSTALLED OR NEWERVERSIONDETECTED]]></RemoveExistingProducts>
<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>