VirtualBox

source: vbox/trunk/src/VBox/Installer/win/VirtualBox.wxs

Last change on this file was 104162, checked in by vboxsync, 2 weeks ago

Windows/Host Installer: Check permissions of target directory when installing. Added a new testcase for this. bugref:10616

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 33.1 KB
Line 
1<?xml version='1.0' encoding='windows-1252'?>
2<!--
3 VirtualBox Windows Installation Script (WiX)
4-->
5<!--
6 Copyright (C) 2014-2023 Oracle and/or its affiliates.
7
8 This file is part of VirtualBox base platform packages, as
9 available from https://www.virtualbox.org.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation, in version 3 of the
14 License.
15
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see <https://www.gnu.org/licenses>.
23
24 SPDX-License-Identifier: GPL-3.0-only
25-->
26
27<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
28 xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension"
29 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
30
31 <?include Defines.wxi ?>
32
33<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
34 <!-- The merge module file names -->
35 <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
36 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
37 <?define Property_VBoxMergeCOM32On64 = "$(env.VBOX_WIN_INST_MERGE_COM32ON64)" ?>
38 <?endif ?>
39 <?if $(env.VBOX_WITH_USB) = "yes" ?>
40 <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
41 <?endif ?>
42 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
43 <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
44 <?endif ?>
45 <?if $(env.VBOX_WITH_NETADP) = "yes" ?>
46 <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
47 <?define Property_VBoxMergeNetworkAdp6 = "$(env.VBOX_WIN_INST_MERGE_NETADP6)" ?>
48 <?endif ?>
49 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
50 <?define Property_VBoxMergeNetworkLwf = "$(env.VBOX_WIN_INST_MERGE_NETLWF)" ?>
51 <?endif ?>
52 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
53 <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
54 <?endif ?>
55<?endif ?>
56
57 <Product Id="*"
58 UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
59 Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
60 Language="!(loc.LANG)"
61 Codepage="1252"
62 Version="$(var.Property_Version)"
63 Manufacturer="$(env.VBOX_VENDOR)">
64
65 <Package Id="*"
66 Keywords="Installer"
67 Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
68 Comments="$(env.VBOX_PRODUCT) installation package"
69 Compressed="yes"
70 Manufacturer="$(env.VBOX_VENDOR)"
71 InstallerVersion="200"
72 InstallPrivileges="elevated"
73 Platform="$(var.Property_Platform)"/>
74
75 <?include CommonProperties.wxi ?>
76
77 <!-- Global properties -->
78 <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
79 <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
80 <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
81
82 <Property Id="NETWORKTYPE" Value="NDIS6" Secure="yes"/>
83
84<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
85 <!-- Force NDIS5 on pre-Vista -->
86 <SetProperty Id="NETWORKTYPE" After="LaunchConditions" Value="NDIS5"><![CDATA[(VersionNT < 600)]]></SetProperty>
87<?endif ?>
88
89 <!-- Whether or not registering of known desktop shortcut for the Quick Launch Bar should be created -->
90 <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1" Secure="yes"/>
91
92 <SetProperty Id="VBOX_REGISTERFILEEXTENSIONS" After="AppSearch" Sequence="both" Value="{}">
93 <![CDATA[VBOX_REGISTERFILEEXTENSIONS="0"]]>
94 </SetProperty>
95
96 <!-- Install the product for all users on the system -->
97 <Property Id="ALLUSERS"><![CDATA[1]]></Property>
98
99 <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
100 <Property Id='REINSTALLMODE' Value='amus'/>
101
102 <?include PublicProperties.wxi ?>
103
104 <!-- Make sure installation will not start on anything other but the NT family -->
105<?if $(env.KBUILD_TARGET_ARCH) = "amd64" ?>
106 <Condition Message="!(loc.Only64Bit)">
107 VersionNT64
108 </Condition>
109<?else ?>
110 <Condition Message="!(loc.Only32Bit)">
111 NOT VersionNT64
112 </Condition>
113
114 <Condition Message="!(loc.WrongOS)">
115 NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
116 </Condition>
117
118<?endif ?>
119
120 <Condition Message="!(loc.NeedAdmin)">
121 Privileged
122 </Condition>
123
124<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
125 <!-- Check if we have the required MS CRT(s) installed when we're not shipping those. -->
126 <Condition Message="!(loc.NeedMSCRT)">
127 Installed OR (VBOX_MSCRT_INSTALLED)
128 </Condition>
129<?endif ?>
130 <!-- Check if the current INSTALLDIR is valid or not, or if VBox already is installed.
131 Thight might be handed-in via command line (MSI properties) or through a customized merge module. See @bugref{10616} -->
132 <Condition Message="!(loc.InvalidTargetDir)">
133 Installed OR (VBox_Target_Dir_Is_Valid="1")
134 </Condition>
135
136 <!-- Detect old innotek installation -->
137 <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
138 <Property Id="VBOXINNOTEK">
139 <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
140 </Property>
141 <Condition Message="!(loc.InnotekFound)">
142 NOT VBOXINNOTEK
143 </Condition>
144
145
146 <!-- *************************** Upgrade packages only ******************************* -->
147 <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
148 IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
149 (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
150 IncludeMaximum = no only finds those below the Maximum).
151 OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
152 only change files in the package -->
153
154 <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
155
156 <!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
157 <!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
158 <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="no" OnlyDetect="no" />
159
160 <!-- Flag is set if the install will trigger an upgrade of an existing install -->
161 <UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
162
163 </Upgrade>
164
165 <!-- The product's icon table -->
166 <Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
167
168 <!-- The media/binary IDs -->
169 <!--
170 The effects of CompressionLevel options:
171 default/mszip, high: 32.54s
172 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:56 common.cab
173 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:56 VirtualBox-5.1.51-r110887_en_US.msi
174 high, high: 46.76s
175 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:49 common.cab
176 -rw-rw-rw- 1 bird 0 34 056 210 2016-09-25 03:49 VirtualBox-5.1.51-r110887_en_US.msi
177 medium, medium: 29.95s
178 -rw-rw-rw- 1 bird 0 56 293 089 2016-09-25 03:53 common.cab
179 -rw-rw-rw- 1 bird 0 35 498 002 2016-09-25 03:54 VirtualBox-5.1.51-r110887_en_US.msi
180 low, low: 25.41s
181 -rw-rw-rw- 1 bird 0 57 616 155 2016-09-25 03:52 common.cab
182 -rw-rw-rw- 1 bird 0 37 181 458 2016-09-25 03:52 VirtualBox-5.1.51-r110887_en_US.msi
183 mszip/default, mszip/default: 16.13s
184 -rw-rw-rw- 1 bird 0 58 751 954 2016-09-25 03:49 common.cab
185 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:50 VirtualBox-5.1.51-r110887_en_US.msi
186 none, none: 2.37s
187 -rw-rw-rw- 1 bird 0 92 470 301 2016-09-25 03:47 common.cab
188 -rw-rw-rw- 1 bird 0 135 874 578 2016-09-25 03:47 VirtualBox-5.1.51-r110887_en_US.msi
189
190 We set the level in the VBOX_CAB_COMPRESSION_LEVEL and VBOX_CAB_COMPRESSION_LEVEL_COMMON
191 environment variables so we don't waste time compressing and decompressing the intermediate
192 language MSIs and the common.cab that we're not going to use (x86).
193 -->
194 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" CompressionLevel="$(env.VBOX_CAB_COMPRESSION_LEVEL)" />
195<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
196 <?if $(env.VBOX_WITH_COMBINED_PACKAGE) = "yes" ?>
197 <Media Id="2" Cabinet="common.cab" EmbedCab="no" CompressionLevel="$(env.VBOX_CAB_COMPRESSION_LEVEL_COMMON)" />
198 <?endif ?>
199<?endif ?>
200 <Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
201
202 <!-- Custom actions -->
203
204 <!-- Figure out where a previous installation was, if any -->
205<?if $(env.KBUILD_TARGET_ARCH) = "amd64" ?>
206 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
207 Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
208
209 <Property Id="EXISTINGINSTALLDIR" Secure="yes">
210 <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
211 Type="raw" Win64="$(var.Property_Win64)"/>
212 </Property>
213 <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
214<?else ?>
215 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
216 Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
217
218 <Property Id="EXISTINGINSTALLDIR" Secure="yes">
219 <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
220 Type="raw" Win64="$(var.Property_Win64)"/>
221 </Property>
222 <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
223<?endif ?>
224 <CustomAction Id="ca_UninstallTAPInstances" BinaryKey="VBoxInstallHelper"
225 DllEntry="UninstallTAPInstances" Execute="deferred" Return="check" Impersonate="no"/>
226
227 <CustomAction Id="ca_UninstallVBoxDrv" BinaryKey="VBoxInstallHelper"
228 DllEntry="UninstallVBoxDrv" Execute="deferred" Return="ignore" Impersonate="no"/>
229
230 <Property Id="VBOXDEPENDENCY" Secure="yes">
231 <DirectorySearch Id="VBoxInstallDir" Path="[EXISTINGINSTALLDIR]">
232 <FileSearch Name="dependency.dep"/>
233 </DirectorySearch>
234 </Property>
235
236<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
237 <Property Id="EXISTING_PYTHON_API_FOLDER" Secure="yes" >
238 <RegistrySearch Id="RegistryGetPythonApiInstallPath" Root="HKLM" Key="$(var.Property_RegKey)"
239 Name="PythonApiInstallDir" Type="raw" Win64="$(var.Property_Win64)"/>
240 </Property>
241<?endif ?>
242
243 <!--
244 install upgrade uninstall
245 VBOXDEPENDENCY 0 1/0 1/0
246 UPGRADINGPRODUCTCODE 0 1 0
247 final 0 1 0
248 not final 1 0 1
249 -->
250
251 <Condition Message="It was detected an application which has been using currently installed VirtualBox version.
252 You must remove this application before continuing installation.
253 See the file dependency.dep in the VirtualBox installation directory for details. ">
254 NOT (VBOXDEPENDENCY AND UPGRADINGPRODUCTCODE)
255 </Condition>
256
257 <!-- Detect old Sun installation -->
258 <!-- Force a manual uninstall of an already installed Sun VirtualBox version first -->
259 <!--<Property Id="VBOXSUN">
260 <RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
261 </Property>
262 <Condition Message="!(loc.SunFound)">
263 NOT VBOXSUN
264 </Condition>-->
265
266 <!-- Note: Only if we include FE/Qt, we offer to start VirtualBox at the end of a successful installation. -->
267<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
268 <!-- Note: Make sure to set the CWD (via 'Directory' attribute) to not run off a possibly temporary directory or some such (see @bugref{10203}). -->
269 <CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
270<?endif ?>
271
272 <CustomAction Id="ca_CheckSerial" BinaryKey="VBoxInstallHelper" DllEntry="CheckSerial" Impersonate="no"/>
273
274 <CustomAction Id="ca_InstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
275 <CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
276
277 <CustomAction Id="ca_UninstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
278 <CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
279
280<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
281 <?include VBoxMergeAppCA.wxi ?>
282 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
283 <?include VBoxMergeCOM32On64CA.wxi ?>
284 <?endif ?>
285 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
286 <?include VBoxMergeNetFltCA.wxi ?>
287 <?include VBoxMergeNetLwfCA.wxi ?>
288 <?endif ?>
289 <?include VBoxMergeNetAdpCA.wxi ?>
290 <?include VBoxMergeNetAdp6CA.wxi ?>
291 <?include VBoxMergeUSBCA.wxi ?>
292 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
293 <?include VBoxMergePythonCA.wxi ?>
294 <?endif ?>
295<?endif ?>
296
297 <Directory Id="TARGETDIR" Name="SourceDir">
298 <Directory Id="$(var.Property_ProgramFiles)" Name="PFiles">
299 <Directory Id="VENDOR" Name="$(env.VBOX_VENDOR_SHORT)">
300 <Directory Id="INSTALLDIR" Name="VirtualBox">
301 <!-- Components for removing empty folder after cleaning traces -->
302 <Component Id="cp_INSTALLDIR" Guid="374723AF-5990-4552-A1B0-82C72EFA360F">
303 <RemoveFolder Id="INSTALLDIR" On="uninstall" />
304 </Component>
305<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
306 <Merge Id="msm_VBoxApp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeApp)" DiskId="1">
307 <ConfigurationData Name="argRegisterExtensions" Value="[VBOX_REGISTERFILEEXTENSIONS]"/>
308 </Merge>
309 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
310 <Merge Id="msm_VBoxCOM32On64" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeCOM32On64)" DiskId="1" />
311 <?endif ?>
312<?else ?>
313 <Directory Id="msm_VBoxApplicationFolder" FileSource=".">
314 <?include VBoxMergeApp.wxi ?>
315 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
316 <?include VBoxMergeCOM32On64.wxi ?>
317 <?endif ?>
318 </Directory>
319<?endif ?>
320 <Directory Id="dir_Drivers" Name="drivers">
321<?if $(env.VBOX_WITH_USB) = "yes" ?>
322 <Directory Id="dir_USB" Name="USB">
323 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
324 <Merge Id="msm_VBoxUSB" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeUSB)" DiskId="1" />
325 <?else ?>
326 <Directory Id="msm_VBoxUSBFolder" FileSource=".">
327 <?include VBoxMergeUSB.wxi ?>
328 </Directory>
329 <?endif ?>
330 </Directory>
331<?endif ?>
332 <Directory Id="dir_Network" Name="network">
333<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
334 <Directory Id="dir_NetFlt" Name="netflt">
335 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
336 <Merge Id="msm_VBoxNetworkFlt" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkFlt)" DiskId="1">
337 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
338 </Merge>
339 <?else ?>
340 <Directory Id="msm_VBoxNetworkFltFolder" FileSource=".">
341 <?include VBoxMergeNetFlt.wxi ?>
342 </Directory>
343 <?endif ?>
344 </Directory>
345<?endif ?>
346<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
347 <Directory Id="dir_NetAdp" Name="netadp">
348 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
349 <Merge Id="msm_VBoxNetworkAdp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp)" DiskId="1">
350 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
351 </Merge>
352 <?else ?>
353 <Directory Id="msm_VBoxNetworkAdpFolder" FileSource=".">
354 <?include VBoxMergeNetAdp.wxi ?>
355 </Directory>
356 <?endif ?>
357 </Directory>
358<?endif ?>
359
360<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
361 <Directory Id="dir_NetLwf" Name="netlwf">
362 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
363 <Merge Id="msm_VBoxNetworkLwf" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkLwf)" DiskId="1">
364 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
365 </Merge>
366 <?else ?>
367 <Directory Id="msm_VBoxNetworkLwfFolder" FileSource=".">
368 <?include VBoxMergeNetLwf.wxi ?>
369 </Directory>
370 <?endif ?>
371 </Directory>
372<?endif ?>
373
374<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
375 <Directory Id="dir_NetAdp6" Name="netadp6">
376 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
377 <Merge Id="msm_VBoxNetworkAdp6" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp6)" DiskId="1">
378 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
379 </Merge>
380 <?else ?>
381 <Directory Id="msm_VBoxNetworkAdp6Folder" FileSource=".">
382 <?include VBoxMergeNetAdp6.wxi ?>
383 </Directory>
384 <?endif ?>
385 </Directory>
386<?endif ?>
387 </Directory>
388 </Directory>
389 <Directory Id="dir_SDK" Name="sdk">
390<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
391 <Directory Id="dir_SDKInstaller" Name="installer"> <!-- Note: For < VBox 7.1 this folder was called 'install'. -->
392 <Directory Id="dir_SDKInstallerPython" Name="python">
393 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
394 <Merge Id="msm_VBoxPython" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergePython)" DiskId="1" />
395 <?else ?>
396 <Directory Id="msm_VBoxPythonFolder" FileSource=".">
397 <?include VBoxMergePython.wxi ?>
398 </Directory>
399 <?endif ?>
400 </Directory>
401 </Directory>
402<?endif ?>
403 <!-- Component for removing empty folder after cleaning traces -->
404 <Component Id="cp_SDK" Guid="ACA59290-B2D6-4E96-B164-C45F70A90219">
405 <RemoveFolder Id="dir_SDK" On="uninstall" />
406 </Component>
407 </Directory>
408
409<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
410 <!-- Set up special directory IDs for referencing to the start menu
411 or the Quick Launch bar.
412 See: http://msdn.microsoft.com/en-us/library/aa368276.aspx
413 http://wix.mindcapers.com/wiki/Shortcuts_in_WiX -->
414 <Directory Id="ProgramMenuFolder">
415 <Directory Id="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)"/>
416 </Directory>
417
418 <Directory Id="DesktopFolder" Name="Desktop"/>
419
420 <Directory Id="AppDataFolder" Name="AppData">
421 <Directory Id="dir_AppDataMicrosoft" Name="Microsoft">
422 <Directory Id="dir_AppDataMSIE" Name="Internet Explorer">
423 <Directory Id="dir_QuicklaunchFolder" Name="Quick Launch"/>
424 </Directory>
425 </Directory>
426 </Directory>
427
428 <!-- Start menu entries. -->
429 <Component Id="cp_StartMenuVBox" Guid="C2DC321A-CE63-40EE-8A98-724DF8BD12FB" Win64="$(var.Property_Win64)">
430 <Condition>VBOX_INSTALLSTARTMENUENTRIES</Condition>
431 <Shortcut Id="sc_StartMenuVBox" Directory="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
432 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
433 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
434 Type="string" Value="installed" KeyPath="yes" />
435 <?include $(env.PATH_TARGET)\Shortcuts_StartMenu.wxi ?>
436 </Component>
437
438 <!-- Desktop shortcut. -->
439 <Component Id="cp_DesktopShortcut" Guid="668F8A1A-F5CE-48B3-BB1A-3042EE27B279" Win64="$(var.Property_Win64)">
440 <Condition>VBOX_INSTALLDESKTOPSHORTCUT</Condition>
441 <Shortcut Id="sc_DesktopVBox" Directory="DesktopFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
442 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
443 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)" Type="string"
444 Value="installed" KeyPath="yes" />
445 </Component>
446
447 <!-- QuickLaunch shortcut. -->
448 <Component Id="cp_QuickLaunchVBox" Guid="CC19E026-938A-41CB-8E77-3F33296244B6" Win64="$(var.Property_Win64)">
449 <CreateFolder/>
450 <Condition>VBOX_INSTALLQUICKLAUNCHSHORTCUT</Condition>
451 <Shortcut Id="sc_QuickLaunchVBox" Directory="dir_QuicklaunchFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
452 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
453 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
454 Type="string" Value="installed" KeyPath="yes" />
455 </Component>
456<?endif ?>
457 </Directory>
458 </Directory>
459 </Directory>
460 </Directory> <!-- TARGETDIR -->
461
462 <!-- Note: Feature IDs *must not* be renamed to use any prefixes or such,
463 otherwise this will break manual selection using the ADDLOCAL= syntax
464 when using the command line / scripts (see VBox manual). -->
465 <Feature Id="VBoxApplication" Title="VirtualBox Application" Level="1"
466 Description="!(loc.VB_App)"
467 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
468 Absent="disallow" AllowAdvertise="no" >
469
470<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
471 <!-- Components which are handled only by this installer itself -->
472 <ComponentRef Id="cp_StartMenuVBox" />
473 <ComponentRef Id="cp_DesktopShortcut" />
474 <ComponentRef Id="cp_QuickLaunchVBox" />
475<?endif ?>
476 <!-- Components for removing empty folders after cleaning traces -->
477 <ComponentRef Id="cp_INSTALLDIR" />
478 <ComponentRef Id="cp_SDK" />
479
480 <!-- Components handled either by the installer itself or
481 the merge module -->
482<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
483 <MergeRef Id="msm_VBoxApp" />
484 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
485 <MergeRef Id="msm_VBoxCOM32On64" />
486 <?endif ?>
487<?else ?>
488 <!-- Make sure to reference the permissions component, which takes care of setting
489 the required ACLs for our files / folders. -->
490 <ComponentRef Id="cp_Permissions" />
491 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
492 <ComponentRef Id="cp_RegisterExtensions" />
493 <?endif ?>
494 <?if $(env.VBOX_WITH_DOCS_PACKING) = "yes" ?>
495 <ComponentRef Id="cp_Docs" />
496 <?endif ?>
497 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
498 <ComponentRef Id="cp_NLS" />
499 <?endif ?>
500 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
501 <ComponentRef Id="cp_MainCOM_x86" />
502 <?endif ?>
503 <ComponentRef Id="cp_MainCOM" />
504 <?if $(env.VBOX_WITH_SDS) = "yes" ?>
505 <ComponentRef Id="cp_VBoxSDS" />
506 <?endif ?>
507 <?if $(env.VBOX_WITH_MIDL_PROXY_STUB) = "yes" ?>
508 <ComponentRef Id="cp_ProxyStub" />
509 <ComponentRef Id="cp_ProxyStubLegacy" />
510 <?endif?>
511 <ComponentRef Id="cp_MainBinaries" />
512 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
513 <ComponentRef Id="cp_QtPlatforms" />
514 <ComponentRef Id="cp_QtSqldrivers" />
515 <ComponentRef Id="cp_QtStyles" />
516 <?endif ?>
517 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
518 <ComponentRef Id="cp_VBoxPyInst" />
519 <ComponentRef Id="cp_VBoxPySetup" />
520 <ComponentRef Id="cp_VBoxPyMod" />
521 <ComponentRef Id="cp_VBoxPyDel" />
522 <?endif ?>
523 <?if $(env.VBOX_WITH_VBOXSDL) = "yes" ?>
524 <ComponentRef Id="cp_VBoxSDLBinaries" />
525 <?endif ?>
526 <?if $(env.VBOX_WITH_WEBSERVICES) = "yes" ?>
527 <ComponentRef Id="cp_VBoxWebService" />
528 <?endif ?>
529 <ComponentRef Id="cp_VBoxCAPI" />
530 <?if $(env.VBOX_WITH_UNATTENDED) = "yes" ?>
531 <!-- unattended template component -->
532 <ComponentRef Id="cp_UnattendedTemplates" />
533 <?endif ?>
534 <?if $(env.VBOX_SIGNING_MODE) != none ?>
535 <ComponentRef Id="cp_VBoxSupCat_PreW10" />
536 <ComponentRef Id="cp_VBoxSupCat_W10" />
537 <?endif ?>
538 <ComponentRef Id="cp_VBoxSup" />
539<?endif ?>
540
541<?if $(env.VBOX_WITH_USB) = "yes" ?>
542 <Feature Id="VBoxUSB" Title="VirtualBox USB Support" Level="1"
543 Description="!(loc.VB_USBDriver)"
544 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
545 Absent="allow" AllowAdvertise="no" >
546 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
547 <MergeRef Id="msm_VBoxUSB" />
548 <?else ?>
549 <?if $(env.VBOX_SIGNING_MODE) != none ?>
550 <ComponentRef Id="cp_USBFilterDriverCat_PreW10" />
551 <ComponentRef Id="cp_USBFilterDriverCat_W10" />
552 <?endif ?>
553 <ComponentRef Id="cp_USBFilterDriver" />
554 <?if $(env.VBOX_SIGNING_MODE) != none ?>
555 <ComponentRef Id="cp_USBDeviceDriverCat_PreW10" />
556 <ComponentRef Id="cp_USBDeviceDriverCat_W10" />
557 <?endif ?>
558 <ComponentRef Id="cp_USBDeviceDriver" />
559 <?endif ?>
560 </Feature>
561<?endif ?>
562
563<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
564 <Feature Id="VBoxNetwork" Title="VirtualBox Networking" Level="1"
565 Description="!(loc.VB_Network)"
566 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
567 Absent="allow" AllowAdvertise="no" >
568 <Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1"
569 Description="!(loc.VB_NetFltDriver)"
570 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
571 Absent="allow" AllowAdvertise="no" >
572 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
573 <MergeRef Id="msm_VBoxNetworkFlt" />
574 <MergeRef Id="msm_VBoxNetworkLwf" />
575 <?else ?>
576 <ComponentRef Id="cp_NetFltDriver" />
577 <?if $(env.VBOX_SIGNING_MODE) != none ?>
578 <ComponentRef Id="cp_NetLwfDriverCat_PreW10" />
579 <ComponentRef Id="cp_NetLwfDriverCat_W10" />
580 <?endif ?>
581 <ComponentRef Id="cp_NetLwfDriver" />
582 <?endif ?>
583 </Feature>
584 <Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1"
585 Description="!(loc.VB_NetAdpDriver)"
586 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
587 Absent="allow" AllowAdvertise="no" >
588 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
589 <MergeRef Id="msm_VBoxNetworkAdp" />
590 <MergeRef Id="msm_VBoxNetworkAdp6" />
591 <?else ?>
592 <ComponentRef Id="cp_NetAdpDriver" />
593 <?if $(env.VBOX_SIGNING_MODE) != none ?>
594 <ComponentRef Id="cp_NetAdp6DriverCat_PreW10" />
595 <ComponentRef Id="cp_NetAdp6DriverCat_W10" />
596 <?endif ?>
597 <ComponentRef Id="cp_NetAdp6Driver" />
598 <?endif ?>
599 </Feature>
600
601 </Feature>
602<?endif ?>
603
604<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
605 <Feature Id="VBoxPython" Title="VirtualBox Python Support" Level="1"
606 Description="!(loc.VB_Python)"
607 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
608 Absent="allow" AllowAdvertise="no" >
609 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
610 <MergeRef Id="msm_VBoxPython" />
611 <?else ?>
612 <ComponentRef Id="cp_VBoxPythonBinding" />
613 <?endif ?>
614 </Feature>
615<?endif ?>
616 </Feature>
617
618 <!-- Include user interface definition -->
619 <?include UserInterface.wxi ?>
620
621 <InstallExecuteSequence>
622
623 <!--
624 To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>"
625
626 InstallUISequence (client side) is:
627 AppSearch
628 LaunchConditions
629 ValidateProductID
630 CostInitialize
631 FileCost
632 CostFinalize
633 ExecuteAction -> will pass control over to "InstallExecuteSequence"
634
635 The first six actions above will be repeated but skipped on the server
636 side if already run on the client side.
637
638 InstallExecuteSequence (server side) is:
639 <First six action from InstallUISequence>
640 .
641 InstallInitialize
642 .
643 InstallFinalize
644
645 The actions between InstallInitialize and InstallFinalize will be gone through twice:
646 - The first time the installer creates an installation script containing all actions in the right
647 sequence which need to get executed in a batch later. At this point the launch conditions for
648 custom actions must be met already!
649 - The second time the generated installation script will be run as-is.
650
651 Also, the InstallUISequence and InstallExecuteSequence tables run in different sessions which
652 need public properties (that is, UPPERCASE properties).
653 -->
654
655 <!-- AppSearch must be done before "RemoveExistingProducts" and before "FindRelatedProducts" -->
656 <AppSearch Sequence="1"></AppSearch>
657 <LaunchConditions After="AppSearch" />
658
659 <!-- First install the new version and then remove the old version. This is more efficient -->
660 <RemoveExistingProducts After="InstallValidate"><![CDATA[PREVIOUSVERSIONSINSTALLED OR NEWERVERSIONDETECTED]]></RemoveExistingProducts>
661
662 <Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR)]]></Custom>
663 <Custom Action="ca_DefaultTargetDir" Before="FileCost" ><![CDATA[NOT INSTALLDIR AND EXISTINGINSTALLDIR]]></Custom>
664
665 <!-- Check + unininstall old TAP instances - we don't need them anymore -->
666 <Custom Action="ca_UninstallTAPInstances" Before="InstallFiles" >1</Custom>
667
668 <!-- Check + uninstall old VBoxDrv service - it was renamed to VBoxSup. -->
669 <Custom Action="ca_UninstallVBoxDrv" Before="InstallFiles" >1</Custom>
670
671 <Custom Action="ca_InstallBrandingArgs" Before="ca_InstallBranding" ><![CDATA[NOT REMOVE]]></Custom>
672 <Custom Action="ca_InstallBranding" Before="InstallFinalize" ><![CDATA[NOT REMOVE]]></Custom>
673
674 <!-- Uninstall branding on complete uninstall, not on update -->
675 <Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
676 <Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
677
678<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
679 <?include VBoxMergeAppSeq.wxi ?>
680 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
681 <?include VBoxMergeCOM32On64Seq.wxi ?>
682 <?endif ?>
683 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
684 <?include VBoxMergeNetFltSeq.wxi ?>
685 <?include VBoxMergeNetLwfSeq.wxi ?>
686 <?endif ?>
687 <?include VBoxMergeNetAdpSeq.wxi ?>
688 <?include VBoxMergeNetAdp6Seq.wxi ?>
689 <?include VBoxMergeUSBSeq.wxi ?>
690 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
691 <?include VBoxMergePythonSeq.wxi ?>
692 <?endif ?>
693<?endif ?>
694
695 </InstallExecuteSequence>
696
697 </Product>
698</Wix>
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use