VBoxGuestAdditionsW2KXP.nsh revision b711a01730152421a900e5f4e237cfb848c9c4fd
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; VBoxGuestAdditionsW2KXP.nsh - Guest Additions installation for Windows 2000/XP.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; Copyright (C) 2006-2012 Oracle Corporation
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; This file is part of VirtualBox Open Source Edition (OSE), as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; available from http://www.virtualbox.org. This file is free software;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; you can redistribute it and/or modify it under the terms of the GNU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; General Public License (GPL) as published by the Free Software
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; Foundation, in version 2 as it comes in the "COPYING" file of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncFunction W2K_SetVideoResolution
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; NSIS only supports global vars, even in functions -- great
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Var /GLOBAL i
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Var /GLOBAL tmp
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Var /GLOBAL tmppath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Var /GLOBAL dev_id
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Var /GLOBAL dev_desc
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Check for all required parameters
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StrCmp $g_iScreenX "0" exit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StrCmp $g_iScreenY "0" exit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StrCmp $g_iScreenBpp "0" exit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DetailPrint "Setting display parameters ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Enumerate all video devices (up to 32 at the moment, use key "MaxObjectNumber" key later)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ${For} $i 0 32
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ReadRegStr $tmp HKLM "HARDWARE\DEVICEMAP\VIDEO" "\Device\Video$i"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StrCmp $tmp "" dev_not_found
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Extract path to video settings
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Ex: \Registry\Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push "$tmp" ; String
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push "\" ; SubString
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push ">" ; SearchDirection
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push ">" ; StrInclusionDirection
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push "0" ; IncludeSubString
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push "2" ; Loops
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Push "0" ; CaseSensitive
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Call StrStrAdv
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Pop $tmppath ; $1 only contains the full path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StrCmp $tmppath "" dev_not_found
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ; Get device description
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ReadRegStr $dev_desc HKLM "$tmppath" "Device Description"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync!ifdef _DEBUG
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DetailPrint "Registry path: $tmppath"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DetailPrint "Registry path to device name: $temp"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DetailPrint "Detected video device: $dev_desc"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DetailPrint "VirtualBox video device found!"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Goto dev_found
ReadRegStr $dev_desc HKLM "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000" "Device Description" ; Try to read device name
; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'
WriteRegDWORD HKCC $reg_path_device "DefaultSettings.XResolution" "$g_iScreenX"
WriteRegDWORD HKCC $reg_path_device "DefaultSettings.YResolution" "$g_iScreenY"
WriteRegDWORD HKCC $reg_path_device "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.XResolution" "$g_iScreenX"
WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.YResolution" "$g_iScreenY"
WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
Delete /REBOOTOK "$INSTDIR\VBoxService.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxMouse.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxGuest.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" ; Not used by W2K and up, but required by the .INF file
FILE "$%PATH_OUT%\bin\additions\VBoxWHQLFake.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxService.exe" ; Only used by W2K and up (for Shared Folders at the moment)
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
FILE "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll" "$g_strSystemDir\VBoxOGLarrayspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll" "$g_strSystemDir\VBoxOGLcrutil.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll" "$g_strSystemDir\VBoxOGLerrorspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll" "$g_strSystemDir\VBoxOGLpackspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll" "$g_strSystemDir\VBoxOGLpassthroughspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll" "$g_strSystemDir\VBoxOGLfeedbackspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGL.dll" "$g_strSystemDir\VBoxOGL.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll" "$SYSDIR\VBoxOGLarrayspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll" "$SYSDIR\VBoxOGLcrutil.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll" "$SYSDIR\VBoxOGLerrorspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll" "$SYSDIR\VBoxOGLpackspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll" "$SYSDIR\VBoxOGLpassthroughspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll" "$SYSDIR\VBoxOGLfeedbackspu.dll" "$0"
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll" "$SYSDIR\VBoxOGL.dll" "$0"
nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "ignore"'
nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "warn"'
!insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
!insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP-x86.dll" "$g_strSysWow64\VBoxMRXNP.dll" "$INSTDIR"
AccessControl::GrantOnFile "$g_strSysWow64\VBoxMRXNP.dll" "(BU)" "GenericRead"
!insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxHook.dll" "$g_strSystemDir\VBoxHook.dll" "$INSTDIR"
AccessControl::GrantOnFile "$g_strSystemDir\VBoxHook.dll" "(BU)" "GenericRead"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxGuest.inf" "$INSTDIR\install_drivers.log"'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf" "$INSTDIR\install_drivers.log"'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideo.inf" "$INSTDIR\install_drivers.log"'
; No need to stop/remove the service here! Do this only on uninstallation!
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxService" "Description" "Manages VM runtime information, time synchronization, remote sysprep execution and miscellaneous utilities for guest operating systems."
; No need to stop/remove the service here! Do this only on uninstallation!
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add WebClient'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add LanmanWorkstation'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add RDPNP'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF $g_iSfOrder'
WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
Delete /REBOOTOK "$INSTDIR\VBoxVideo.sys"
Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf"
Delete /REBOOTOK "$INSTDIR\VBoxVideo.cat"
Delete /REBOOTOK "$INSTDIR\VBoxDisp.dll"
Delete /REBOOTOK "$INSTDIR\VBoxMouse.sys"
Delete /REBOOTOK "$INSTDIR\VBoxMouse.inf"
Delete /REBOOTOK "$INSTDIR\VBoxMouse.cat"
Delete /REBOOTOK "$INSTDIR\VBoxTray.exe"
Delete /REBOOTOK "$INSTDIR\VBoxGuest.sys"
Delete /REBOOTOK "$INSTDIR\VBoxGuest.inf"
Delete /REBOOTOK "$INSTDIR\VBoxGuest.cat"
Delete /REBOOTOK "$INSTDIR\VBCoInst.dll" ; Deprecated, does not get installed anymore
Delete /REBOOTOK "$INSTDIR\VBoxControl.exe"
Delete /REBOOTOK "$INSTDIR\VBoxService.exe" ; Deprecated, does not get installed anymore
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\libWine.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
Delete /REBOOTOK "$INSTDIR\VBoxWHQLFake.exe"
Delete /REBOOTOK "$INSTDIR\install.log"
Delete /REBOOTOK "$INSTDIR\install_ui.log"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoWddm'
;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoWddm.sys"
Delete /REBOOTOK "$g_strSystemDir\VBoxDispD3D.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLarrayspu.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLcrutil.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLerrorspu.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpackspu.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpassthroughspu.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGLfeedbackspu.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxOGL.dll"
Delete /REBOOTOK "$g_strSystemDir\libWine.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxD3D8.dll"
Delete /REBOOTOK "$g_strSystemDir\VBoxD3D9.dll"
Delete /REBOOTOK "$g_strSystemDir\wined3d.dll"
${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d8.dll"
Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d9.dll"
Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
${If} ${FileExists} "$g_strSystemDir\msd3d8.dll"
Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
${If} ${FileExists} "$g_strSystemDir\msd3d9.dll"
Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLarrayspu.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLcrutil.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLerrorspu.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpackspu.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpassthroughspu.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGLfeedbackspu.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxOGL.dll"
Delete /REBOOTOK "$g_strSysWow64\libWine.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxD3D8.dll"
Delete /REBOOTOK "$g_strSysWow64\VBoxD3D9.dll"
Delete /REBOOTOK "$g_strSysWow64\wined3d.dll"
${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d8.dll"
Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d8.dll"
${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d9.dll"
Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d9.dll"
${If} ${FileExists} "$g_strSysWow64\msd3d8.dll"
Delete /REBOOTOK "$g_strSysWow64\d3d8.dll"
${If} ${FileExists} "$g_strSysWow64\msd3d9.dll"
Delete /REBOOTOK "$g_strSysWow64\d3d9.dll"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxMouse'
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
${If} $0 == "VBoxGINA.dll"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
Delete /REBOOTOK "$g_strSystemDir\VBCoInst.dll" ; Deprecated, does not get installed anymore
Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" ; Remove VBoxTray autorun
Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider remove VBoxSF'
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxSF'
Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked
Delete /REBOOTOK "$g_strSysWow64\VBoxMRXNP.dll"
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"