VBoxGuestAdditionsW2KXP.nsh revision 6fd13c2e3e855d7f5a7147cb0414af050e1503e6
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; $Id$
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync;; @file
1ce069685b24d243eb0464f46d4c56b250c64445vboxsync; VBoxGuestAdditionsW2KXP.nsh - Guest Additions installation for Windows 2000/XP.
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync;
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync;
c58f1213e628a545081c70e26c6b67a841cff880vboxsync; Copyright (C) 2006-2013 Oracle Corporation
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync;
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; This file is part of VirtualBox Open Source Edition (OSE), as
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; available from http://www.virtualbox.org. This file is free software;
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; you can redistribute it and/or modify it under the terms of the GNU
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; General Public License (GPL) as published by the Free Software
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; Foundation, in version 2 as it comes in the "COPYING" file of the
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync;
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunction W2K_SetVideoResolution
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; NSIS only supports global vars, even in functions -- great
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL i
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL tmp
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL tmppath
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL dev_id
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL dev_desc
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Check for all required parameters
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $g_iScreenX "0" exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $g_iScreenY "0" exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $g_iScreenBpp "0" exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Setting display parameters ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Enumerate all video devices (up to 32 at the moment, use key "MaxObjectNumber" key later)
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${For} $i 0 32
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ReadRegStr $tmp HKLM "HARDWARE\DEVICEMAP\VIDEO" "\Device\Video$i"
9ce5d949e4f1572d445a5c0aecabe9de8b672c99vboxsync StrCmp $tmp "" dev_not_found
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Extract path to video settings
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Ex: \Registry\Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync Push "$tmp" ; String
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push "\" ; SubString
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push ">" ; SearchDirection
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push ">" ; StrInclusionDirection
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push "0" ; IncludeSubString
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push "2" ; Loops
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync Push "0" ; CaseSensitive
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Call StrStrAdv
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Pop $tmppath ; $1 only contains the full path
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $tmppath "" dev_not_found
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Get device description
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ReadRegStr $dev_desc HKLM "$tmppath" "Device Description"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!ifdef _DEBUG
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Registry path: $tmppath"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Registry path to device name: $temp"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Detected video device: $dev_desc"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "VirtualBox video device found!"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Goto dev_found
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
376b92d26cc4fad78e813cf33afcc0784adc9b19vboxsync ${Next}
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync Goto dev_not_found
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsyncdev_found:
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ; If we're on Windows 2000, skip the ID detection ...
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ${If} $g_strWinVersion == "2000"
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync Goto change_res
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ${EndIf}
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync Goto dev_found_detect_id
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsyncdev_found_detect_id:
376b92d26cc4fad78e813cf33afcc0784adc9b19vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync StrCpy $i 0 ; Start at index 0
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ${LogVerbose} "Detecting device ID ..."
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsyncdev_found_detect_id_loop:
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ; Resolve real path to hardware instance "{GUID}"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync EnumRegKey $dev_id HKLM "SYSTEM\CurrentControlSet\Control\Video" $i
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $dev_id "" dev_not_found ; No more entries? Jump out
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!ifdef _DEBUG
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Got device ID: $dev_id"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ReadRegStr $dev_desc HKLM "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000" "Device Description" ; Try to read device name
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Device ID of $dev_desc: $dev_id"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Goto change_res
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync IntOp $i $i + 1 ; Increment index
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync goto dev_found_detect_id_loop
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncdev_not_found:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
f409459bdd4c15cdb8d7fb6c6d54338cce9ac814vboxsync ${LogVerbose} "No VirtualBox video device (yet) detected! No custom mode set."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Goto exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncchange_res:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!ifdef _DEBUG
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Device description: $dev_desc"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Device ID: $dev_id"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL reg_path_device
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Var /GLOBAL reg_path_monitor
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Custom mode set: Platform is Windows $g_strWinVersion"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_strWinVersion == "2000"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "Vista"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0\Mon00000001"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${ElseIf} $g_strWinVersion == "XP"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "7"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "8"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "8_1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "10"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\Control\VIDEO\$dev_id\0000\Mon00000001"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${Else}
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${LogVerbose} "Custom mode set: Windows $g_strWinVersion not supported yet"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync Goto exit
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${EndIf}
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD" "false"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD" "false"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD" "false"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ; ... and tell Windows to use that mode on next start!
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.XResolution" "$g_iScreenX"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.YResolution" "$g_iScreenY"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.XResolution" "$g_iScreenX"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.YResolution" "$g_iScreenY"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync ${LogVerbose} "Custom mode set to $g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP on next restart."
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsyncexit:
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsyncFunctionEnd
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsyncFunction W2K_Prepare
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ${If} $g_bNoVBoxServiceExit == "false"
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ; Stop / kill VBoxService
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync Call StopVBoxService
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ${EndIf}
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ${If} $g_bNoVBoxTrayExit == "false"
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ; Stop / kill VBoxTray
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync Call StopVBoxTray
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ${EndIf}
9cb702c3a5fd2287c57c7c1e98a61ba9e357b4devboxsync
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync ; Delete VBoxService from registry
6fe1329154975472e055284198df7fa8e64dee3avboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsync ; Delete old VBoxService.exe from install directory (replaced by VBoxTray.exe)
6fe1329154975472e055284198df7fa8e64dee3avboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe"
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsyncFunctionEnd
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsyncFunction W2K_CopyFiles
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsync Push $0
6fe1329154975472e055284198df7fa8e64dee3avboxsync SetOutPath "$INSTDIR"
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsync ; Video driver
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsync ; Mouse driver
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.sys"
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.inf"
6fe1329154975472e055284198df7fa8e64dee3avboxsync!ifdef VBOX_SIGN_ADDITIONS
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.cat"
6fe1329154975472e055284198df7fa8e64dee3avboxsync!endif
6fe1329154975472e055284198df7fa8e64dee3avboxsync
6fe1329154975472e055284198df7fa8e64dee3avboxsync ; Guest driver
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.sys"
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.inf"
6fe1329154975472e055284198df7fa8e64dee3avboxsync!ifdef VBOX_SIGN_ADDITIONS
6fe1329154975472e055284198df7fa8e64dee3avboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.cat"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync!endif
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; Guest driver files
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" ; Not used by W2K and up, but required by the .INF file
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; WHQL fake
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync!ifdef WHQL_FAKE
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync FILE "$%PATH_OUT%\bin\additions\VBoxWHQLFake.exe"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync!endif
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync SetOutPath $g_strSystemDir
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; VBoxService
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ${If} $g_bNoVBoxServiceExit == "false"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; VBoxService has been terminated before, so just install the file
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; in the regular way
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ${Else}
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; VBoxService is in use and wasn't terminated intentionally. So extract the
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ; new version into a temporary location and install it on next reboot
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync Push $0
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ClearErrors
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync GetTempFileName $0
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync IfErrors 0 +3
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ${LogVerbose} "Error getting temp file for VBoxService.exe"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync StrCpy "$0" "$INSTDIR\VBoxServiceTemp.exe"
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync ${LogVerbose} "VBoxService is in use, will be installed on next reboot (from '$0')"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync File "/oname=$0" "$%PATH_OUT%\bin\additions\VBoxService.exe"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync IfErrors 0 +2
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Error copying VBoxService.exe to '$0'"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Rename /REBOOTOK "$0" "$g_strSystemDir\VBoxService.exe"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync IfErrors 0 +2
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Error renaming '$0' to '$g_strSystemDir\VBoxService.exe'"
ae16af2d7d3c99d359094a7f19f5937efc2e66bdvboxsync Pop $0
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!if $%VBOX_WITH_WDDM% == "1"
ae017640afff8b6cc50453182a4edf2eb0903a12vboxsync ${If} $g_bWithWDDM == "true"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync ; WDDM Video driver
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync SetOutPath "$INSTDIR"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync ${If} $g_strWinVersion == "8"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync ${OrIf} $g_strWinVersion == "8_1"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync ${OrIf} $g_strWinVersion == "10"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !ifdef VBOX_SIGN_ADDITIONS
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !endif
8b7ee9f7ebabcdbf40fececa0d6321d97d5143d8vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
8b7ee9f7ebabcdbf40fececa0d6321d97d5143d8vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync ${Else}
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !endif
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !ifdef VBOX_SIGN_ADDITIONS
31a693ce9a8a9ebbecdcea9f24ce7f912aef4cd1vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !endif
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync ${EndIf}
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync !endif
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync
7e837ad8d6aeb3f86520ea7adb61e4eb15f2087evboxsync !if $%VBOX_WITH_CROGL% == "1"
ae017640afff8b6cc50453182a4edf2eb0903a12vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
b986941f0aa5155c7fd37da0aa5876675a7680e4vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
b986941f0aa5155c7fd37da0aa5876675a7680e4vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
b986941f0aa5155c7fd37da0aa5876675a7680e4vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
b986941f0aa5155c7fd37da0aa5876675a7680e4vboxsync
b986941f0aa5155c7fd37da0aa5876675a7680e4vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif ; $%VBOX_WITH_CROGL% == "1"
ae16af2d7d3c99d359094a7f19f5937efc2e66bdvboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync !if $%VBOX_WITH_CROGL% == "1"
cdf129515a2b03bc9d122091ce7656d6e6934cc7vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif ; $%VBOX_WITH_CROGL% == "1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif ; $%BUILD_TARGET_ARCH% == "amd64"
29d55b79593710186ceda5a557fdab1727972175vboxsync
29d55b79593710186ceda5a557fdab1727972175vboxsync Goto doneCr
29d55b79593710186ceda5a557fdab1727972175vboxsync ${EndIf}
29d55b79593710186ceda5a557fdab1727972175vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
29d55b79593710186ceda5a557fdab1727972175vboxsync
29d55b79593710186ceda5a557fdab1727972175vboxsync!if $%VBOX_WITH_CROGL% == "1"
29d55b79593710186ceda5a557fdab1727972175vboxsync ; crOpenGL
29d55b79593710186ceda5a557fdab1727972175vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !define LIBRARY_X64 ; Enable installation of 64-bit libraries
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCpy $0 "$TEMP\VBoxGuestAdditions\VBoxOGL"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync CreateDirectory "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll" "$g_strSystemDir\VBoxOGLarrayspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll" "$g_strSystemDir\VBoxOGLcrutil.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll" "$g_strSystemDir\VBoxOGLerrorspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll" "$g_strSystemDir\VBoxOGLpackspu.dll" "$0"
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll" "$g_strSystemDir\VBoxOGLpassthroughspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll" "$g_strSystemDir\VBoxOGLfeedbackspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGL.dll" "$g_strSystemDir\VBoxOGL.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync !undef LIBRARY_X64 ; Disable installation of 64-bit libraries
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCpy $0 "$TEMP\VBoxGuestAdditions\VBoxOGL32"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync CreateDirectory "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target arch in
42aef05f4b27fb393967e581be04be455064c80avboxsync ; Wow64 node (32-bit sub system). Note that $SYSDIR contains the 32-bit
42aef05f4b27fb393967e581be04be455064c80avboxsync ; path after calling EnableX64FSRedirection
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EnableX64FSRedirection}
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll" "$SYSDIR\VBoxOGLarrayspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll" "$SYSDIR\VBoxOGLcrutil.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll" "$SYSDIR\VBoxOGLerrorspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll" "$SYSDIR\VBoxOGLpackspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll" "$SYSDIR\VBoxOGLpassthroughspu.dll" "$0"
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll" "$SYSDIR\VBoxOGLfeedbackspu.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll" "$SYSDIR\VBoxOGL.dll" "$0"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${DisableX64FSRedirection}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif ; VBOX_WITH_CROGL
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncdoneCr:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Pop $0
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunctionEnd
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync!ifdef WHQL_FAKE
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsyncFunction W2K_WHQLFakeOn
29d55b79593710186ceda5a557fdab1727972175vboxsync
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync StrCmp $g_bFakeWHQL "true" do
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync Goto exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsyncdo:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Turning off WHQL protection..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"ignore$\"" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncexit:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunctionEnd
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunction W2K_WHQLFakeOff
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync StrCmp $g_bFakeWHQL "true" do
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Goto exit
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncdo:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Turning back on WHQL protection..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"warn$\"" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncexit:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunctionEnd
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncFunction W2K_InstallFiles
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; The Shared Folder IFS goes to the system directory
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync FILE /oname=$g_strSystemDir\drivers\VBoxSF.sys "$%PATH_OUT%\bin\additions\VBoxSF.sys"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Only 64-bit installer: Copy the 32-bit DLL for 32 bit applications.
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP-x86.dll" "$g_strSysWow64\VBoxMRXNP.dll" "$INSTDIR"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync AccessControl::GrantOnFile "$g_strSysWow64\VBoxMRXNP.dll" "(BU)" "GenericRead"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync ; The VBoxTray hook DLL also goes to the system directory; it might be locked
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxHook.dll" "$g_strSystemDir\VBoxHook.dll" "$INSTDIR"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync AccessControl::GrantOnFile "$g_strSystemDir\VBoxHook.dll" "(BU)" "GenericRead"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing drivers ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Push $0 ; For fetching results
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync SetOutPath "$INSTDIR"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_bNoGuestDrv == "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing guest driver ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ${LogVerbose} "Guest driver installation skipped!"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_bNoVideoDrv == "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_bWithWDDM == "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_strWinVersion == "8"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "8_1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == "10"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing WDDM video driver for Windows 8 or newer..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoW8.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing WDDM video driver for Windows Vista and 7..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoWddm.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing video driver ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Video driver installation skipped!"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_bNoMouseDrv == "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing mouse driver ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; The mouse filter does not contain any device IDs but a "DefaultInstall" section;
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; with VBoxDrvInst's "driver executeinf" routine
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver executeinf $\"$INSTDIR\VBoxMouse.inf$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Mouse driver installation skipped!"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Create the VBoxService service
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing VirtualBox service ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"system32\VBoxService.exe$\" $\"Base$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ; Set service description
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxService" "Description" "Manages VM runtime information, time synchronization, remote sysprep execution and miscellaneous utilities for guest operating systems."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsyncsf:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing Shared Folders service ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Create the Shared Folders service ...
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"system32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; ... and the link to the network provider
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Add default network providers (if not present or corrupted)
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add WebClient" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add LanmanWorkstation" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add RDPNP" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Add the shared folders network provider
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Adding network provider (Order = $g_iSfOrder) ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF $g_iSfOrder" "false"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!if $%VBOX_WITH_CROGL% == "1"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsynccropengl:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_bWithWDDM == "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Nothing to do here
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${Else}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Installing 3D OpenGL support ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
e48239695d41f806ff02d8a60b97dc20d4822d7avboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!if $%BUILD_TARGET_ARCH% == "amd64"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync SetRegView 32
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Write additional keys required for Windows XP, Vista and 7 64-bit (but for 32-bit stuff)
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $g_strWinVersion == '10'
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == '8_1'
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${OrIf} $g_strWinVersion == '8'
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == '7'
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${OrIf} $g_strWinVersion == 'Vista'
4f3d37f3c8ea851c3d57304fac430764b77a84dcvboxsync ${OrIf} $g_strWinVersion == '2003' ; Windows XP 64-bit is a renamed Windows 2003 really
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync ${EndIf}
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync SetRegView 64
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!endif
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync ${Endif}
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!endif
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Goto done
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsyncdone:
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Pop $0
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsyncFunctionEnd
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsyncFunction W2K_Main
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync SetOutPath "$INSTDIR"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync SetOverwrite on
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_Prepare
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_CopyFiles
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync!ifdef WHQL_FAKE
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_WHQLFakeOn
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!endif
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_InstallFiles
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!ifdef WHQL_FAKE
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_WHQLFakeOff
4f3d37f3c8ea851c3d57304fac430764b77a84dcvboxsync!endif
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Call W2K_SetVideoResolution
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsyncFunctionEnd
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!macro W2K_UninstallInstDir un
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsyncFunction ${un}W2K_UninstallInstDir
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.sys"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.cat"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync Delete /REBOOTOK "$INSTDIR\VBoxDisp.dll"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.sys"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.inf"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.cat"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxTray.exe"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.sys"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.inf"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.cat"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBCoInst.dll" ; Deprecated, does not get installed anymore
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxControl.exe"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe" ; Deprecated, does not get installed anymore
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync!if $%VBOX_WITH_WDDM% == "1"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync !endif
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync ; Try to delete libWine in case it is there from old installation
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\libWine.dll"
8ccde4f32d77b1ad3f02111f28a48ee85abf6779vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
b4bcdbd7ac35c938e6f71a6403fe9f3ebf106a07vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync !endif ; $%BUILD_TARGET_ARCH% == "amd64"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; WHQL fake
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!ifdef WHQL_FAKE
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$INSTDIR\VBoxWHQLFake.exe"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!endif
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Log file
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$INSTDIR\install.log"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$INSTDIR\install_ui.log"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsyncFunctionEnd
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!macroend
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!insertmacro W2K_UninstallInstDir ""
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!insertmacro W2K_UninstallInstDir "un."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!macro W2K_Uninstall un
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsyncFunction ${un}W2K_Uninstall
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Push $0
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Remove VirtualBox video driver
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${LogVerbose} "Uninstalling video driver ..."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideo.inf$\"" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Remove video driver
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!if $%VBOX_WITH_WDDM% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${LogVerbose} "Uninstalling WDDM video driver for Windows 8..."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\"" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoW8" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoW8.sys"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync !endif ; $%VBOX_WITH_WDDM_W8% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${LogVerbose} "Uninstalling WDDM video driver for Windows Vista and 7..."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\"" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoWddm" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoWddm.sys"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDispD3D.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!if $%VBOX_WITH_CROGL% == "1"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${LogVerbose} "Removing Direct3D support ..."
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; Do file validation before we uninstall
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Call ${un}ValidateD3DFiles
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Pop $0
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${If} $0 == "1" ; D3D files are invalid
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${LogVerbose} $(VBOX_UNINST_INVALID_D3D)
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync MessageBox MB_ICONSTOP|MB_OK $(VBOX_UNINST_INVALID_D3D) /SD IDOK
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Goto d3d_uninstall_end
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${EndIf}
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLarrayspu.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLcrutil.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLerrorspu.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpackspu.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpassthroughspu.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLfeedbackspu.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGL.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; Remove D3D stuff
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; @todo add a feature flag to only remove if installed explicitly
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\libWine.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\wined3d.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; Update DLL cache
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d8.dll" "$g_strSystemDir\dllcache\d3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${EndIf}
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${EndIf}
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; Restore original DX DLLs
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${If} ${FileExists} "$g_strSystemDir\msd3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d8.dll" "$g_strSystemDir\d3d8.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${EndIf}
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${If} ${FileExists} "$g_strSystemDir\msd3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d9.dll" "$g_strSystemDir\d3d9.dll"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ${EndIf}
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
a38afdea3cc827dc5964b4ba39a5cae6dbae23bdvboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLarrayspu.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLcrutil.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLerrorspu.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpackspu.dll"
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpassthroughspu.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLfeedbackspu.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGL.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Remove D3D stuff
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; @todo add a feature flag to only remove if installed explicitly
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\libWine.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxD3D8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxD3D9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\wined3d.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Update DLL cache
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d8.dll" "$g_strSysWow64\dllcache\d3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d9.dll" "$g_strSysWow64\dllcache\d3d9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Restore original DX DLLs
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} ${FileExists} "$g_strSysWow64\msd3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\d3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Rename /REBOOTOK "$g_strSysWow64\msd3d8.dll" "$g_strSysWow64\d3d8.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} ${FileExists} "$g_strSysWow64\msd3d9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSysWow64\d3d9.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Rename /REBOOTOK "$g_strSysWow64\msd3d9.dll" "$g_strSysWow64\d3d9.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync !endif ; amd64
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsyncd3d_uninstall_end:
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync!endif ; VBOX_WITH_CROGL
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Remove mouse driver
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Removing mouse driver ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxMouse" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry delmultisz $\"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}$\" $\"UpperFilters$\" $\"VBoxMouse$\"" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Delete the VBoxService service
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Call ${un}StopVBoxService
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxService" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; VBoxGINA
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${If} $0 == "VBoxGINA.dll"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Removing auto-logon support ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${EndIf}
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA"
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Delete VBoxTray
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Call ${un}StopVBoxTray
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ; Remove guest driver
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${LogVerbose} "Removing guest driver ..."
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxGuest.inf$\"" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" "true"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\VBCoInst.dll" ; Deprecated, does not get installed anymore
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" ; Remove VBoxTray autorun
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
4328e87247f4a96449677e199c7e99ef516fc1cevboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Remove shared folders driver
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${LogVerbose} "Removing shared folders driver ..."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider remove VBoxSF" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxSF" "true"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxMRXNP.dll"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync !endif ; amd64
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync Pop $0
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsyncFunctionEnd
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!macroend
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!insertmacro W2K_Uninstall ""
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync!insertmacro W2K_Uninstall "un."
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync