VBoxGuestAdditionsW2KXP.nsh revision 5f41c5732fa948e5fa142eb3997465c540574f84
f650118f144626d9f84baace12426f962f41a252vboxsync; VBoxGuestAdditionsW2KXP.nsh - Guest Additions installation for Windows 2000/XP.
f650118f144626d9f84baace12426f962f41a252vboxsync; Copyright (C) 2006-2013 Oracle Corporation
f650118f144626d9f84baace12426f962f41a252vboxsync; This file is part of VirtualBox Open Source Edition (OSE), as
f650118f144626d9f84baace12426f962f41a252vboxsync; available from http://www.virtualbox.org. This file is free software;
f650118f144626d9f84baace12426f962f41a252vboxsync; you can redistribute it and/or modify it under the terms of the GNU
f650118f144626d9f84baace12426f962f41a252vboxsync; General Public License (GPL) as published by the Free Software
f650118f144626d9f84baace12426f962f41a252vboxsync; Foundation, in version 2 as it comes in the "COPYING" file of the
f650118f144626d9f84baace12426f962f41a252vboxsync; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
f650118f144626d9f84baace12426f962f41a252vboxsync; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
f650118f144626d9f84baace12426f962f41a252vboxsyncFunction W2K_SetVideoResolution
f650118f144626d9f84baace12426f962f41a252vboxsync ; NSIS only supports global vars, even in functions -- great
f650118f144626d9f84baace12426f962f41a252vboxsync Var /GLOBAL i
f650118f144626d9f84baace12426f962f41a252vboxsync Var /GLOBAL tmp
f650118f144626d9f84baace12426f962f41a252vboxsync Var /GLOBAL tmppath
f650118f144626d9f84baace12426f962f41a252vboxsync Var /GLOBAL dev_id
f650118f144626d9f84baace12426f962f41a252vboxsync Var /GLOBAL dev_desc
f650118f144626d9f84baace12426f962f41a252vboxsync ; Check for all required parameters
f650118f144626d9f84baace12426f962f41a252vboxsync StrCmp $g_iScreenX "0" exit
f650118f144626d9f84baace12426f962f41a252vboxsync StrCmp $g_iScreenY "0" exit
f650118f144626d9f84baace12426f962f41a252vboxsync StrCmp $g_iScreenBpp "0" exit
f650118f144626d9f84baace12426f962f41a252vboxsync ${LogVerbose} "Setting display parameters ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
f650118f144626d9f84baace12426f962f41a252vboxsync ; Enumerate all video devices (up to 32 at the moment, use key "MaxObjectNumber" key later)
f650118f144626d9f84baace12426f962f41a252vboxsync ${For} $i 0 32
f650118f144626d9f84baace12426f962f41a252vboxsync ReadRegStr $tmp HKLM "HARDWARE\DEVICEMAP\VIDEO" "\Device\Video$i"
f650118f144626d9f84baace12426f962f41a252vboxsync StrCmp $tmp "" dev_not_found
f650118f144626d9f84baace12426f962f41a252vboxsync ; Extract path to video settings
f650118f144626d9f84baace12426f962f41a252vboxsync ; Ex: \Registry\Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
f650118f144626d9f84baace12426f962f41a252vboxsync ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
a62ce5472a6bd50322d061cb720cd84ae5038371vboxsync ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
a62ce5472a6bd50322d061cb720cd84ae5038371vboxsync Push "$tmp" ; String
f650118f144626d9f84baace12426f962f41a252vboxsync Push "\" ; SubString
f650118f144626d9f84baace12426f962f41a252vboxsync Push ">" ; SearchDirection
f650118f144626d9f84baace12426f962f41a252vboxsync Push ">" ; StrInclusionDirection
f650118f144626d9f84baace12426f962f41a252vboxsync Push "0" ; IncludeSubString
f650118f144626d9f84baace12426f962f41a252vboxsync Push "2" ; Loops
f650118f144626d9f84baace12426f962f41a252vboxsync Push "0" ; CaseSensitive
f650118f144626d9f84baace12426f962f41a252vboxsync Call StrStrAdv
f650118f144626d9f84baace12426f962f41a252vboxsync Pop $tmppath ; $1 only contains the full path
f650118f144626d9f84baace12426f962f41a252vboxsync StrCmp $tmppath "" dev_not_found
f650118f144626d9f84baace12426f962f41a252vboxsync ; Get device description
f650118f144626d9f84baace12426f962f41a252vboxsync ReadRegStr $dev_desc HKLM "$tmppath" "Device Description"
f650118f144626d9f84baace12426f962f41a252vboxsync!ifdef _DEBUG
f650118f144626d9f84baace12426f962f41a252vboxsync ${LogVerbose} "Registry path: $tmppath"
f650118f144626d9f84baace12426f962f41a252vboxsync ${LogVerbose} "Registry path to device name: $temp"
f650118f144626d9f84baace12426f962f41a252vboxsync ${LogVerbose} "Detected video device: $dev_desc"
f650118f144626d9f84baace12426f962f41a252vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
f650118f144626d9f84baace12426f962f41a252vboxsync ${LogVerbose} "VirtualBox video device found!"
f650118f144626d9f84baace12426f962f41a252vboxsync Goto dev_found
f650118f144626d9f84baace12426f962f41a252vboxsync Goto dev_not_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
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD" "false"
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"
${LogVerbose} "Error getting temp file for VBoxService.exe"
StrCpy "$0" "$INSTDIR\VBoxServiceTemp.exe"
File "/oname=$0" "$%PATH_OUT%\bin\additions\VBoxService.exe"
${LogVerbose} "Error copying VBoxService.exe to '$0'"
Rename /REBOOTOK "$0" "$g_strSystemDir\VBoxService.exe"
${LogVerbose} "Error renaming '$0' to '$g_strSystemDir\VBoxService.exe'"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
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"
${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"ignore$\"" "true"
${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"warn$\"" "true"
!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"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoW8.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoWddm.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver executeinf $\"$INSTDIR\VBoxMouse.inf$\"" "false"
; No need to stop/remove the service here! Do this only on uninstallation!
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"system32\VBoxService.exe$\" $\"Base$\"" "false"
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!
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"system32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" "false"
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"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add WebClient" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add LanmanWorkstation" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add RDPNP" "false"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF $g_iSfOrder" "false"
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\VBoxVideoW8.cat"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.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"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" "true"
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\"" "true"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoW8" "true"
;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\VBoxVideoW8.sys"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\"" "true"
; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoWddm" "true"
;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"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxMouse" "true"
Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry delmultisz $\"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}$\" $\"UpperFilters$\" $\"VBoxMouse$\"" "true"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxService" "true"
Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
${If} $0 == "VBoxGINA.dll"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" "true"
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"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider remove VBoxSF" "true"
${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxSF" "true"
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"