VirtualBox.wxs revision 9e9bbda1a3a15840a424c00d01097fd5fdeb65e5
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe VirtualBox Windows Installation Script (WiX)
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Copyright (C) 2014 Oracle Corporation
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe This file is part of VirtualBox Open Source Edition (OSE), as
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe available from http://www.virtualbox.org. This file is free software;
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe you can redistribute it and/or modify it under the terms of the GNU
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe General Public License (GPL) as published by the Free Software
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Foundation, in version 2 as it comes in the "COPYING" file of the
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe VirtualBox OSE distribution. VirtualBox OSE is distributed in the
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- The merge module file names -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeCOM32On64 = "$(env.VBOX_WIN_INST_MERGE_COM32ON64)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeNetworkLwf = "$(env.VBOX_WIN_INST_MERGE_NETLWF)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergeNetworkAdp6 = "$(env.VBOX_WIN_INST_MERGE_NETADP6)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Language="!(loc.LANG)"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Codepage="1252"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Manufacturer="$(env.VBOX_VENDOR)">
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Keywords="Installer"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Comments="$(env.VBOX_PRODUCT) installation package"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Compressed="yes"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Manufacturer="$(env.VBOX_VENDOR)"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe InstallerVersion="200"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe InstallPrivileges="elevated"
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe Platform="$(var.Property_Platform)"/>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Global properties -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Default property for network adapter type -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="NETWORKTYPE" Value="NDIS6" Secure="yes"/>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Force NDIS5 on pre-Vista -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <SetProperty Id="NETWORKTYPE" After="CostFinalize" Value="NDIS5"><![CDATA[VersionNT < 600]]></SetProperty>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Install the product for all users on the system -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- VirtualBox properties -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="VBOX_INSTALLDESKTOPSHORTCUT" Value="1" />
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="VBOX_INSTALLQUICKLAUNCHSHORTCUT" Value="1" />
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1" />
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Make sure installation will not start on anything other but the NT family -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe VersionNT64
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Condition>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe NOT VersionNT64
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Condition>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Condition>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Condition>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Detect old innotek installation -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Property>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe NOT VBOXINNOTEK
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe </Condition>
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- *************************** Upgrade packages only ******************************* -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe IncludeMaximum = no only finds those below the Maximum).
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe only change files in the package -->
ca7a44a6825a4ec88afaa6e4f23fb0fb7c52d3dfwrowe <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
<!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
<!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
<UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="no" OnlyDetect="no" />
<UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
Value="[ProgramFiles64Folder]\$(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]" />
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]" />
<Condition Message="It was detected an application which has been using currently installed VirtualBox version.
See the file dependency.dep in the VirtualBox installation directory for details. ">
<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_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_DefaultTargetDir" Before="FileCost" ><![CDATA[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>