VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsVista.nsh@ 40716

Last change on this file since 40716 was 40631, checked in by vboxsync, 13 years ago

Windows Guest Additions installer: Respect 64-bit guests when doing shell execution stuff.

  • Property svn:eol-style set to native
File size: 3.5 KB
Line 
1; $Id$
2; @file
3; VBoxGuestAdditionsVista.nsh - Guest Additions installation for Windows Vista/7.
4;
5
6;
7; Copyright (C) 2006-2012 Oracle Corporation
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.virtualbox.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17
18Function Vista_CheckForRequirements
19
20 Push $0
21
22 DetailPrint "Checking for installation requirements for Vista / Windows 7 / Windows 8 ..."
23
24 ${If} $g_bForceInstall == "true"
25 DetailPrint "Forcing installatoin, checking requirements skipped"
26 goto success
27 ${EndIf}
28
29 ; Validate D3D files, regardless whether D3D support is selected or not
30 Call ValidateD3DFiles
31 Pop $0
32 ${If} $0 == "1" ; D3D files are invalid, notify user
33 MessageBox MB_ICONSTOP|MB_OKCANCEL $(VBOX_COMPONENT_D3D_INVALID) /SD IDOK IDCANCEL failure
34 ; Offer to open up the VBox online manual on how to fix missing/corrupted D3D files
35 MessageBox MB_ICONQUESTION|MB_YESNO $(VBOX_COMPONENT_D3D_INVALID_MANUAL) /SD IDNO IDYES open_handbook_d3d_invalid
36 ${EndIf}
37 Goto success
38
39open_handbook_d3d_invalid:
40
41 ; @todo Add a language GET parameter (e.g. ?lang=enUS) here as soon as we got the
42 ; handbook online in different languages
43 ; Don't use https here (even if we offer it) -- we only want to display the handbook
44 Call SetAppMode64 ; For shell execution we need to switch to 64-bit mode first
45 ExecShell open "http://www.virtualbox.org/manual/ch12.html#ts_d3d8-d3d9-restore"
46 IfErrors 0 +2
47 MessageBox MB_ICONSTOP|MB_OK $(VBOX_ERROR_OPEN_LINK) /SD IDOK
48 Call SetAppMode32
49 Goto failure
50
51failure:
52
53 Abort "ERROR: Requirements not met! Installation aborted."
54 goto exit
55
56success:
57
58 ; Nothing to do here right now
59 Goto exit
60
61exit:
62
63 Pop $0
64
65FunctionEnd
66
67Function Vista_CopyFiles
68
69 SetOutPath "$INSTDIR"
70 SetOverwrite on
71
72 ; The files are for Vista only, they go into the application directory
73
74 ; VBoxNET drivers are not tested yet - commented out until officially supported and released
75 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.inf"
76 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.sys"
77
78
79FunctionEnd
80
81Function Vista_InstallFiles
82
83 DetailPrint "Installing drivers for Vista / Windows 7 / Windows 8 ..."
84
85 SetOutPath "$INSTDIR"
86 ; Nothing here yet
87 Goto done
88
89error:
90
91 Abort "ERROR: Could not install files! Installation aborted."
92
93done:
94
95FunctionEnd
96
97Function Vista_Main
98
99 Call Vista_CopyFiles
100 Call Vista_InstallFiles
101
102FunctionEnd
103
104!macro Vista_UninstallInstDir un
105Function ${un}Vista_UninstallInstDir
106
107!if $%BUILD_TARGET_ARCH% == "x86" ; 32-bit
108 Delete /REBOOTOK "$INSTDIR\netamd.inf"
109 Delete /REBOOTOK "$INSTDIR\pcntpci5.cat"
110 Delete /REBOOTOK "$INSTDIR\PCNTPCI5.sys"
111!endif
112
113FunctionEnd
114!macroend
115!insertmacro Vista_UninstallInstDir ""
116!insertmacro Vista_UninstallInstDir "un."
117
118!macro Vista_Uninstall un
119Function ${un}Vista_Uninstall
120
121 ; Remove credential provider
122 DetailPrint "Removing auto-logon support ..."
123 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
124 DeleteRegKey HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
125 Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
126
127FunctionEnd
128!macroend
129!insertmacro Vista_Uninstall ""
130!insertmacro Vista_Uninstall "un."
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette