VirtualBox.wxs revision 6607ec59eb22f1743c9d17440afb9fba49517ba5
4cc260724e1b5a0b499d7b76bbd510551fcb1af0vboxsync VirtualBox Windows Installation Script (WiX)
4cc260724e1b5a0b499d7b76bbd510551fcb1af0vboxsync Copyright (C) 2014 Oracle Corporation
f38425d9a45b6fff87cdea80a27d58b22283a141vboxsync This file is part of VirtualBox Open Source Edition (OSE), as
4cc260724e1b5a0b499d7b76bbd510551fcb1af0vboxsync available from http://www.virtualbox.org. This file is free software;
4cc260724e1b5a0b499d7b76bbd510551fcb1af0vboxsync you can redistribute it and/or modify it under the terms of the GNU
f38425d9a45b6fff87cdea80a27d58b22283a141vboxsync General Public License (GPL) as published by the Free Software
4cc260724e1b5a0b499d7b76bbd510551fcb1af0vboxsync Foundation, in version 2 as it comes in the "COPYING" file of the
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync VirtualBox OSE distribution. VirtualBox OSE is distributed in the
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync <!-- The merge module file names -->
f9dfa074e1d326c23ca62279b18b3b9efc0a7b73vboxsync <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
Version="$(var.Property_Version)"
Manufacturer="$(env.VBOX_VENDOR)">
Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
Comments="$(env.VBOX_PRODUCT) installation package"
Manufacturer="$(env.VBOX_VENDOR)"
Platform="$(var.Property_Platform)"/>
<RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
(IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
<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)" 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]" />
<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_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>