VirtualBox

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

Last change on this file since 93634 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.5 KB
Line 
1; $Id: VBoxGuestAdditionsVista.nsh 93115 2022-01-01 11:31:46Z vboxsync $
2;; @file
3; VBoxGuestAdditionsVista.nsh - Guest Additions installation for Windows Vista/7.
4;
5
6;
7; Copyright (C) 2006-2022 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 ${LogVerbose} "Checking for installation requirements for Vista / Windows 7 / Windows 8 ..."
23
24 ; Nothing to do here right now.
25
26 Pop $0
27
28FunctionEnd
29
30Function Vista_Prepare
31
32 ; Try to restore the original Direct3D files in case we're coming from an old(er) Guest Additions
33 ; installation, which formerly replaced those system files with our own stubs.
34 ; This no longer is needed and thus needs to be reverted in any case.
35 Call RestoreFilesDirect3D
36 ; Ignore the result in case we had trouble restoring. The system would be in an inconsistent state anyway.
37
38 Call VBoxMMR_Uninstall
39
40FunctionEnd
41
42Function Vista_CopyFiles
43
44 SetOutPath "$INSTDIR"
45 SetOverwrite on
46
47 ; The files are for Vista only, they go into the application directory
48
49 ; VBoxNET drivers are not tested yet - commented out until officially supported and released
50 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.inf"
51 ;FILE "$%PATH_OUT%\bin\additions\VBoxNET.sys"
52
53FunctionEnd
54
55Function Vista_InstallFiles
56
57 ${LogVerbose} "Installing drivers for Vista / Windows 7 / Windows 8 ..."
58
59 SetOutPath "$INSTDIR"
60 ; Nothing here yet
61
62 Goto done
63
64error:
65
66 Abort "ERROR: Could not install files! Installation aborted."
67
68done:
69
70FunctionEnd
71
72Function Vista_Main
73
74 Call Vista_Prepare
75 Call Vista_CopyFiles
76 Call Vista_InstallFiles
77
78FunctionEnd
79
80!macro Vista_UninstallInstDir un
81Function ${un}Vista_UninstallInstDir
82
83!if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit
84 Delete /REBOOTOK "$INSTDIR\netamd.inf"
85 Delete /REBOOTOK "$INSTDIR\pcntpci5.cat"
86 Delete /REBOOTOK "$INSTDIR\PCNTPCI5.sys"
87!endif
88
89FunctionEnd
90!macroend
91!insertmacro Vista_UninstallInstDir ""
92!insertmacro Vista_UninstallInstDir "un."
93
94!macro Vista_Uninstall un
95Function ${un}Vista_Uninstall
96
97 ; Remove credential provider
98 ${LogVerbose} "Removing auto-logon support ..."
99 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
100 DeleteRegKey HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}"
101 Delete /REBOOTOK "$g_strSystemDir\VBoxCredProv.dll"
102
103 Call ${un}VBoxMMR_Uninstall
104
105FunctionEnd
106!macroend
107!insertmacro Vista_Uninstall ""
108!insertmacro Vista_Uninstall "un."
109
110!macro VBoxMMR_Uninstall un
111Function ${un}VBoxMMR_Uninstall
112
113 ; Remove VBoxMMR always
114
115 DetailPrint "Uninstalling VBoxMMR."
116 Call ${un}StopVBoxMMR
117
118 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxMMR"
119
120 Delete /REBOOTOK "$g_strSystemDir\VBoxMMR.exe"
121
122 !if $%KBUILD_TARGET_ARCH% == "amd64"
123 Delete /REBOOTOK "$g_strSysWow64\VBoxMMRHook.dll"
124 Delete /REBOOTOK "$INSTDIR\VBoxMMR-x86.exe"
125 Delete /REBOOTOK "$INSTDIR\VBoxMMRHook-x86.dll"
126 !else
127 Delete /REBOOTOK "$g_strSystemDir\VBoxMMRHook.dll"
128 Delete /REBOOTOK "$INSTDIR\VBoxMMR.exe"
129 Delete /REBOOTOK "$INSTDIR\VBoxMMRHook.dll"
130 !endif
131
132FunctionEnd
133!macroend
134!insertmacro VBoxMMR_Uninstall ""
135!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