VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.8 KB
Line 
1; $Id: VBoxGuestAdditionsVista.nsh 96407 2022-08-22 17:43:14Z vboxsync $
2;; @file
3; VBoxGuestAdditionsVista.nsh - Guest Additions installation for Windows Vista/7.
4;
5
6;
7; Copyright (C) 2006-2022 Oracle and/or its affiliates.
8;
9; This file is part of VirtualBox base platform packages, as
10; available from https://www.virtualbox.org.
11;
12; This program is free software; you can redistribute it and/or
13; modify it under the terms of the GNU General Public License
14; as published by the Free Software Foundation, in version 3 of the
15; License.
16;
17; This program is distributed in the hope that it will be useful, but
18; WITHOUT ANY WARRANTY; without even the implied warranty of
19; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20; General Public License for more details.
21;
22; You should have received a copy of the GNU General Public License
23; along with this program; if not, see <https://www.gnu.org/licenses>.
24;
25; SPDX-License-Identifier: GPL-3.0-only
26;
27
28Function Vista_CheckForRequirements
29
30 Push $0
31
32 ${LogVerbose} "Checking for installation requirements for Vista / Windows 7 / Windows 8 ..."
33
34 ; Nothing to do here right now.
35
36 Pop $0
37
38FunctionEnd
39
40Function Vista_Prepare
41
42 ; Try to restore the original Direct3D files in case we're coming from an old(er) Guest Additions
43 ; installation, which formerly replaced those system files with our own stubs.
44 ; This no longer is needed and thus needs to be reverted in any case.
45 Call RestoreFilesDirect3D
46 ; Ignore the result in case we had trouble restoring. The system would be in an inconsistent state anyway.
47
48 Call VBoxMMR_Uninstall
49
50FunctionEnd
51
52Function Vista_CopyFiles
53
54 SetOutPath "$INSTDIR"
55 SetOverwrite on
56
57 ; The files are for Vista only, they go into the application directory
58
59 ; VBoxNET drivers are not tested yet - commented out until officially supported and released
60 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.inf"
61 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.sys"
62
63FunctionEnd
64
65Function Vista_InstallFiles
66
67 ${LogVerbose} "Installing drivers for Vista / Windows 7 / Windows 8 ..."
68
69 SetOutPath "$INSTDIR"
70 ; Nothing here yet
71
72 Goto done
73
74error:
75
76 Abort "ERROR: Could not install files! Installation aborted."
77
78done:
79
80FunctionEnd
81
82Function Vista_Main
83
84 Call Vista_Prepare
85 Call Vista_CopyFiles
86 Call Vista_InstallFiles
87
88FunctionEnd
89
90!macro Vista_UninstallInstDir un
91Function ${un}Vista_UninstallInstDir
92
93!if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit
94 Delete /REBOOTOK "$INSTDIR\netamd.inf"
95 Delete /REBOOTOK "$INSTDIR\pcntpci5.cat"
96 Delete /REBOOTOK "$INSTDIR\PCNTPCI5.sys"
97!endif
98
99FunctionEnd
100!macroend
101!insertmacro Vista_UninstallInstDir ""
102!insertmacro Vista_UninstallInstDir "un."
103
104!macro Vista_Uninstall un
105Function ${un}Vista_Uninstall
106
107 ; Remove credential provider
108 ${LogVerbose} "Removing auto-logon support ..."
109 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
110 DeleteRegKey HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
111 Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
112
113 Call ${un}VBoxMMR_Uninstall
114
115FunctionEnd
116!macroend
117!insertmacro Vista_Uninstall ""
118!insertmacro Vista_Uninstall "un."
119
120!macro VBoxMMR_Uninstall un
121Function ${un}VBoxMMR_Uninstall
122
123 ; Remove VBoxMMR always
124
125 DetailPrint "Uninstalling VBoxMMR."
126 Call ${un}StopVBoxMMR
127
128 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxMMR"
129
130 Delete /REBOOTOK "$g_strSystemDir\VBoxMMR.exe"
131
132 !if $%KBUILD_TARGET_ARCH% == "amd64"
133 Delete /REBOOTOK "$g_strSysWow64\VBoxMMRHook.dll"
134 Delete /REBOOTOK "$INSTDIR\VBoxMMR-x86.exe"
135 Delete /REBOOTOK "$INSTDIR\VBoxMMRHook-x86.dll"
136 !else
137 Delete /REBOOTOK "$g_strSystemDir\VBoxMMRHook.dll"
138 Delete /REBOOTOK "$INSTDIR\VBoxMMR.exe"
139 Delete /REBOOTOK "$INSTDIR\VBoxMMRHook.dll"
140 !endif
141
142FunctionEnd
143!macroend
144!insertmacro VBoxMMR_Uninstall ""
145!insertmacro VBoxMMR_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