VBoxGuestAdditionsW2KXP.nsh revision 223a6730e81629b0bf552ccc31f119a998cc8e27
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; VBoxGuestAdditionsW2KXP.nsh - Guest Additions installation for Windows 2000/XP.
b711a01730152421a900e5f4e237cfb848c9c4fdvboxsync; Copyright (C) 2006-2012 Oracle Corporation
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; This file is part of VirtualBox Open Source Edition (OSE), as
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; available from http://www.virtualbox.org. This file is free software;
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; you can redistribute it and/or modify it under the terms of the GNU
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; General Public License (GPL) as published by the Free Software
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; Foundation, in version 2 as it comes in the "COPYING" file of the
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_SetVideoResolution
78a072e1b56619e3230735ae073668311232ec94vboxsync ; NSIS only supports global vars, even in functions -- great
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL i
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL tmp
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL tmppath
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL dev_id
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL dev_desc
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Check for all required parameters
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_iScreenX "0" exit
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_iScreenY "0" exit
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_iScreenBpp "0" exit
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Setting display parameters ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Enumerate all video devices (up to 32 at the moment, use key "MaxObjectNumber" key later)
78a072e1b56619e3230735ae073668311232ec94vboxsync ${For} $i 0 32
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $tmp HKLM "HARDWARE\DEVICEMAP\VIDEO" "\Device\Video$i"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $tmp "" dev_not_found
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Extract path to video settings
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Ex: \Registry\Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push "$tmp" ; String
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push "\" ; SubString
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push ">" ; SearchDirection
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push ">" ; StrInclusionDirection
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push "0" ; IncludeSubString
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push "2" ; Loops
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call StrStrAdv
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $tmppath ; $1 only contains the full path
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $tmppath "" dev_not_found
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Get device description
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $dev_desc HKLM "$tmppath" "Device Description"
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Registry path: $tmppath"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Registry path to device name: $temp"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Detected video device: $dev_desc"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "VirtualBox video device found!"
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_found
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_not_found
78a072e1b56619e3230735ae073668311232ec94vboxsync ; If we're on Windows 2000, skip the ID detection ...
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "2000"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync Goto change_res
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_found_detect_id
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_found_detect_id:
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $i 0 ; Start at index 0
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Detecting device ID ..."
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_found_detect_id_loop:
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Resolve real path to hardware instance "{GUID}"
78a072e1b56619e3230735ae073668311232ec94vboxsync EnumRegKey $dev_id HKLM "SYSTEM\CurrentControlSet\Control\Video" $i
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $dev_id "" dev_not_found ; No more entries? Jump out
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Got device ID: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $dev_desc HKLM "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000" "Device Description" ; Try to read device name
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Device ID of $dev_desc: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto change_res
78a072e1b56619e3230735ae073668311232ec94vboxsync IntOp $i $i + 1 ; Increment index
78a072e1b56619e3230735ae073668311232ec94vboxsync goto dev_found_detect_id_loop
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_not_found:
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "No VirtualBox video device (yet) detected! No custom mode set."
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Device description: $dev_desc"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Device ID: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_device
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_monitor
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DetailPrint "Custom mode set: Platform is Windows $g_strWinVersion"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "2000"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${OrIf} $g_strWinVersion == "Vista"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0\Mon00000001"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${ElseIf} $g_strWinVersion == "XP"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${OrIf} $g_strWinVersion == "7"
36dd9dabf3f64468206cb74145b51245cf7fde54vboxsync ${OrIf} $g_strWinVersion == "8"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\Control\VIDEO\$dev_id\0000\Mon00000001"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DetailPrint "Custom mode set: Windows $g_strWinVersion not supported yet"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'
78a072e1b56619e3230735ae073668311232ec94vboxsync ; ... and tell Windows to use that mode on next start!
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.XResolution" "$g_iScreenX"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.YResolution" "$g_iScreenY"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_device "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.XResolution" "$g_iScreenX"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.YResolution" "$g_iScreenY"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKCC $reg_path_monitor "DefaultSettings.BitsPerPixel" "$g_iScreenBpp"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Custom mode set to $g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP on next restart."
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_Prepare
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync ${If} $g_bNoVBoxServiceExit == "false"
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync ; Stop / kill VBoxService
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync Call StopVBoxService
156101683587682f6d63b4af322f611d90b77fcevboxsync ${If} $g_bNoVBoxTrayExit == "false"
156101683587682f6d63b4af322f611d90b77fcevboxsync ; Stop / kill VBoxTray
156101683587682f6d63b4af322f611d90b77fcevboxsync Call StopVBoxTray
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete VBoxService from registry
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete old VBoxService.exe from install directory (replaced by VBoxTray.exe)
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_CopyFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Video driver
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Mouse driver
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef VBOX_SIGN_ADDITIONS
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouse.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Guest driver
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef VBOX_SIGN_ADDITIONS
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuest.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Guest driver files
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe" ; Not used by W2K and up, but required by the .INF file
78a072e1b56619e3230735ae073668311232ec94vboxsync ; WHQL fake
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxWHQLFake.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath $g_strSystemDir
78a072e1b56619e3230735ae073668311232ec94vboxsync ; VBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxService.exe" ; Only used by W2K and up (for Shared Folders at the moment)
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${If} $g_bWithWDDM == "true"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ; WDDM Video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync SetOutPath "$INSTDIR"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${If} $g_strWinVersion == "8"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !ifdef VBOX_SIGN_ADDITIONS
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !ifdef VBOX_SIGN_ADDITIONS
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%VBOX_WITH_CROGL% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif ; $%VBOX_WITH_CROGL% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%VBOX_WITH_CROGL% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif ; $%VBOX_WITH_CROGL% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif ; $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Goto doneCr
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
e7184fff6d89903aed623860629a05047960ac2dvboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
e7184fff6d89903aed623860629a05047960ac2dvboxsync !define LIBRARY_X64 ; Enable installation of 64-bit libraries
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync StrCpy $0 "$TEMP\VBoxGuestAdditions\VBoxOGL"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync CreateDirectory "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll" "$g_strSystemDir\VBoxOGLarrayspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll" "$g_strSystemDir\VBoxOGLcrutil.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll" "$g_strSystemDir\VBoxOGLerrorspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll" "$g_strSystemDir\VBoxOGLpackspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll" "$g_strSystemDir\VBoxOGLpassthroughspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll" "$g_strSystemDir\VBoxOGLfeedbackspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%PATH_OUT%\bin\additions\VBoxOGL.dll" "$g_strSystemDir\VBoxOGL.dll" "$0"
e7184fff6d89903aed623860629a05047960ac2dvboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
e7184fff6d89903aed623860629a05047960ac2dvboxsync !undef LIBRARY_X64 ; Disable installation of 64-bit libraries
78a072e1b56619e3230735ae073668311232ec94vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync StrCpy $0 "$TEMP\VBoxGuestAdditions\VBoxOGL32"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync CreateDirectory "$0"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target arch in
8c0c57682eef5165bb0410323fde49e6c80ffee7vboxsync ; Wow64 node (32-bit sub system). Note that $SYSDIR contains the 32-bit
a7f7772b10998f4308fbbf134e8e8f9e0612f314vboxsync ; path after calling EnableX64FSRedirection
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EnableX64FSRedirection}
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll" "$SYSDIR\VBoxOGLarrayspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll" "$SYSDIR\VBoxOGLcrutil.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll" "$SYSDIR\VBoxOGLerrorspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll" "$SYSDIR\VBoxOGLpackspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll" "$SYSDIR\VBoxOGLpassthroughspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll" "$SYSDIR\VBoxOGLfeedbackspu.dll" "$0"
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll" "$SYSDIR\VBoxOGL.dll" "$0"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${DisableX64FSRedirection}
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_WHQLFakeOn
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bFakeWHQL "true" do
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Turning off WHQL protection..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "ignore"'
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_WHQLFakeOff
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bFakeWHQL "true" do
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Turning back on WHQL protection..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "warn"'
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_InstallFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync ; The Shared Folder IFS goes to the system directory
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE /oname=$g_strSystemDir\drivers\VBoxSF.sys "$%PATH_OUT%\bin\additions\VBoxSF.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync ; Only 64-bit installer: Copy the 32-bit DLL for 32 bit applications.
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxMRXNP-x86.dll" "$g_strSysWow64\VBoxMRXNP.dll" "$INSTDIR"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync AccessControl::GrantOnFile "$g_strSysWow64\VBoxMRXNP.dll" "(BU)" "GenericRead"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; The VBoxTray hook DLL also goes to the system directory; it might be locked
78a072e1b56619e3230735ae073668311232ec94vboxsync !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxHook.dll" "$g_strSystemDir\VBoxHook.dll" "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync AccessControl::GrantOnFile "$g_strSystemDir\VBoxHook.dll" "(BU)" "GenericRead"
e0adfb501c7b93b2d26c01286b43f82996fb4a2avboxsync DetailPrint "Installing drivers ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push $0 ; For fetching results
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoGuestDrv == "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing guest driver ..."
93fe33ae8ca5b796d3f83c3f7a9051f2840071bbvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxGuest.inf" "$INSTDIR\install_drivers.log"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Guest driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Guest driver installation skipped!"
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoVideoDrv == "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bWithWDDM == "true"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${If} $g_strWinVersion == "8"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync DetailPrint "Installing WDDM video driver for Windows 8..."
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoW8.inf" "$INSTDIR\install_drivers.log"'
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync DetailPrint "Installing WDDM video driver for Windows Vista and 7..."
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf" "$INSTDIR\install_drivers.log"'
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing video driver ..."
93fe33ae8ca5b796d3f83c3f7a9051f2840071bbvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideo.inf" "$INSTDIR\install_drivers.log"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Video driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Video driver installation skipped!"
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoMouseDrv == "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing mouse driver ..."
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; The mouse filter does not contain any device IDs but a "DefaultInstall" section;
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; with VBoxDrvInst's "driver executeinf" routine
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver executeinf "$INSTDIR\VBoxMouse.inf"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Mouse driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Mouse driver installation skipped!"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Create the VBoxService service
78a072e1b56619e3230735ae073668311232ec94vboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing VirtualBox service ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "VBoxService returned: $0"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Set service description
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxService" "Description" "Manages VM runtime information, time synchronization, remote sysprep execution and miscellaneous utilities for guest operating systems."
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing Shared Folders service ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Create the Shared Folders service ...
78a072e1b56619e3230735ae073668311232ec94vboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'
78a072e1b56619e3230735ae073668311232ec94vboxsync ; ... and the link to the network provider
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add default network providers (if not present or corrupted)
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add WebClient'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add LanmanWorkstation'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add RDPNP'
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add the shared folders network provider
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Adding network provider (Order = $g_iSfOrder) ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF $g_iSfOrder'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ${If} $g_bWithWDDM == "true"
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ; Nothing to do here
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync DetailPrint "Installing 3D OpenGL support ..."
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync!if $%BUILD_TARGET_ARCH% == "amd64"
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync SetRegView 32
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ; Write additional keys required for Windows XP, Vista and 7 64-bit (but for 32-bit stuff)
b4a81d521ea7f88aca6f77b2725541e58a2dc018vboxsync ${If} $g_strWinVersion == '8'
b4a81d521ea7f88aca6f77b2725541e58a2dc018vboxsync ${OrIf} $g_strWinVersion == '7'
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${OrIf} $g_strWinVersion == 'Vista'
53780dd927c61ad44fec1ad2564f3af224111587vboxsync ${OrIf} $g_strWinVersion == '2003' ; Windows XP 64-bit is a renamed Windows 2003 really
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync SetRegView 64
78a072e1b56619e3230735ae073668311232ec94vboxsync Abort "ERROR: Could not install files for Windows 2000 / XP / Vista! Installation aborted."
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_Main
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOverwrite on
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_Prepare
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_CopyFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_WHQLFakeOn
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_InstallFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_WHQLFakeOff
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_SetVideoResolution
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro W2K_UninstallInstDir un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}W2K_UninstallInstDir
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxVideo.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxTray.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.cat"
f6afc7bc4533a33c56dadc0008389a232defb0dbvboxsync Delete /REBOOTOK "$INSTDIR\VBCoInst.dll" ; Deprecated, does not get installed anymore
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxControl.exe"
f6afc7bc4533a33c56dadc0008389a232defb0dbvboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe" ; Deprecated, does not get installed anymore
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Try to delete libWine in case it is there from old installation
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\libWine.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLcrutil-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpackspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxOGL-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxD3D9wddm-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\wined3dwddm-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif ; $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; WHQL fake
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxWHQLFake.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\install.log"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\install_ui.log"
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_UninstallInstDir ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_UninstallInstDir "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro W2K_Uninstall un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}W2K_Uninstall
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove VirtualBox video driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Uninstalling video driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideo.inf'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync DetailPrint "Uninstalling WDDM video driver for Windows 8..."
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideoW8.inf"'
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Pop $0 ; Ret value
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ; Always try to remove both VBoxVideoW8 & VBoxVideoWddm services no matter what is installed currently
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoW8'
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Pop $0 ; Ret value
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoW8.sys"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !endif ; $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync DetailPrint "Uninstalling WDDM video driver for Windows Vista and 7..."
5c195b9d7263169f7f40cfc9c9e2a9a785bde519vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideoWddm.inf"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoWddm'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoWddm.sys"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync DetailPrint "Removing Direct3D support ..."
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ; Do file validation before we uninstall
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Call ${un}ValidateD3DFiles
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} $0 == "1" ; D3D files are invalid
f80e6bc7517cd2846b8b42c0b7da9293903f3244vboxsync DetailPrint $(VBOX_UNINST_INVALID_D3D)
f80e6bc7517cd2846b8b42c0b7da9293903f3244vboxsync MessageBox MB_ICONSTOP|MB_OK $(VBOX_UNINST_INVALID_D3D) /SD IDOK
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Goto d3d_uninstall_end
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLarrayspu.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLcrutil.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLerrorspu.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpackspu.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpassthroughspu.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLfeedbackspu.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGL.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; Remove D3D stuff
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; @todo add a feature flag to only remove if installed explicitly
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\libWine.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\wined3d.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; Update DLL cache
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d8.dll" "$g_strSystemDir\dllcache\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSystemDir\dllcache\msd3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; Restore original DX DLLs
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSystemDir\msd3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d8.dll" "$g_strSystemDir\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSystemDir\msd3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d9.dll" "$g_strSystemDir\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLarrayspu.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLcrutil.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLerrorspu.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpackspu.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLpassthroughspu.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGLfeedbackspu.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxOGL.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove D3D stuff
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo add a feature flag to only remove if installed explicitly
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\libWine.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxD3D8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxD3D9.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\wined3d.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Update DLL cache
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d8.dll" "$g_strSysWow64\dllcache\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSysWow64\dllcache\msd3d9.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\dllcache\d3d9.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Rename /REBOOTOK "$g_strSysWow64\dllcache\msd3d9.dll" "$g_strSysWow64\dllcache\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Restore original DX DLLs
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSysWow64\msd3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Rename /REBOOTOK "$g_strSysWow64\msd3d8.dll" "$g_strSysWow64\d3d8.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} ${FileExists} "$g_strSysWow64\msd3d9.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Delete /REBOOTOK "$g_strSysWow64\d3d9.dll"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Rename /REBOOTOK "$g_strSysWow64\msd3d9.dll" "$g_strSysWow64\d3d9.dll"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif ; amd64
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsyncd3d_uninstall_end:
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove mouse driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing mouse driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxMouse'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete the VBoxService service
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxService
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ${If} $0 == "VBoxGINA.dll"
223d0cc6ed8bf5767cb97c734684460b8eae31a8vboxsync DetailPrint "Removing auto-logon support ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
be603ce3cb13b5ee7f4c3d85ea27ff41ac294535vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete VBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove guest driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing guest driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxGuest.inf"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
f6afc7bc4533a33c56dadc0008389a232defb0dbvboxsync Delete /REBOOTOK "$g_strSystemDir\VBCoInst.dll" ; Deprecated, does not get installed anymore
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" ; Remove VBoxTray autorun
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove shared folders driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing shared folders driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider remove VBoxSF'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxSF'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
f6afc7bc4533a33c56dadc0008389a232defb0dbvboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync Delete /REBOOTOK "$g_strSysWow64\VBoxMRXNP.dll"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync !endif ; amd64
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall "un."