VBoxGuestAdditionsW2KXP.nsh revision 59bb2da0ef97dc8c9d0821ac921728f515623ac5
b711a01730152421a900e5f4e237cfb848c9c4fdvboxsync; $Id$
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync;; @file
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync; VBoxGuestAdditionsW2KXP.nsh - Guest Additions installation for Windows 2000/XP.
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync;
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync;
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync; Copyright (C) 2006-2013 Oracle Corporation
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync;
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.
94872a0e88ab4f38c786fcf617ddeb4b63a76957vboxsync;
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_SetVideoResolution
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
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
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Setting display parameters ($g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP) ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Enumerate all video devices (up to 32 at the moment, use key "MaxObjectNumber" key later)
78a072e1b56619e3230735ae073668311232ec94vboxsync ${For} $i 0 32
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $tmp HKLM "HARDWARE\DEVICEMAP\VIDEO" "\Device\Video$i"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $tmp "" dev_not_found
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Get device description
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $dev_desc HKLM "$tmppath" "Device Description"
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Registry path: $tmppath"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Registry path to device name: $temp"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Detected video device: $dev_desc"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "VirtualBox video device found!"
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_found
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync ${Next}
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_not_found
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_found:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; If we're on Windows 2000, skip the ID detection ...
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "2000"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync Goto change_res
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto dev_found_detect_id
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_found_detect_id:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $i 0 ; Start at index 0
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Detecting device ID ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_found_detect_id_loop:
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Got device ID: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
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"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Device ID of $dev_desc: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto change_res
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync IntOp $i $i + 1 ; Increment index
78a072e1b56619e3230735ae073668311232ec94vboxsync goto dev_found_detect_id_loop
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdev_not_found:
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "No VirtualBox video device (yet) detected! No custom mode set."
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncchange_res:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Device description: $dev_desc"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Device ID: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_device
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_monitor
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "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"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${Else}
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Custom mode set: Windows $g_strWinVersion not supported yet"
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD" "false"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD" "false"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD" "false"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
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
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Custom mode set to $g_iScreenXx$g_iScreenY, $g_iScreenBpp BPP on next restart."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_Prepare
78a072e1b56619e3230735ae073668311232ec94vboxsync
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync ${If} $g_bNoVBoxServiceExit == "false"
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync ; Stop / kill VBoxService
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync Call StopVBoxService
34aa2e97a2a6d7c3c0a5be5121edfd51a31281acvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
156101683587682f6d63b4af322f611d90b77fcevboxsync ${If} $g_bNoVBoxTrayExit == "false"
156101683587682f6d63b4af322f611d90b77fcevboxsync ; Stop / kill VBoxTray
156101683587682f6d63b4af322f611d90b77fcevboxsync Call StopVBoxTray
156101683587682f6d63b4af322f611d90b77fcevboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete VBoxService from registry
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete old VBoxService.exe from install directory (replaced by VBoxTray.exe)
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_CopyFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Video driver
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
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!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; WHQL fake
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxWHQLFake.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath $g_strSystemDir
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; VBoxService
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ${If} $g_bNoVBoxServiceExit == "false"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ; VBoxService has been terminated before, so just install the file
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ; in the regular way
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ${Else}
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ; VBoxService is in use and wasn't terminated intentionally. So extract the
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ; new version into a temporary location and install it on next reboot
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync Push $0
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ClearErrors
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync GetTempFileName $0
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync IfErrors 0 +3
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Error getting temp file for VBoxService.exe"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync StrCpy "$0" "$INSTDIR\VBoxServiceTemp.exe"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "VBoxService is in use, will be installed on next reboot (from '$0')"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync File "/oname=$0" "$%PATH_OUT%\bin\additions\VBoxService.exe"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync IfErrors 0 +2
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Error copying VBoxService.exe to '$0'"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync Rename /REBOOTOK "$0" "$g_strSystemDir\VBoxService.exe"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync IfErrors 0 +2
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Error renaming '$0' to '$g_strSystemDir\VBoxService.exe'"
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync Pop $0
d66cebf0d963aca5db00a447d8a60efcb80c11aavboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${If} $g_bWithWDDM == "true"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ; WDDM Video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync SetOutPath "$INSTDIR"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
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 !endif
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.sys"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.inf"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${Else}
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !ifdef VBOX_SIGN_ADDITIONS
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${EndIf}
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
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
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9wddm.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\wined3dwddm.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif ; $%VBOX_WITH_CROGL% == "1"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
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
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"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Goto doneCr
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${EndIf}
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; crOpenGL
e7184fff6d89903aed623860629a05047960ac2dvboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
e7184fff6d89903aed623860629a05047960ac2dvboxsync !define LIBRARY_X64 ; Enable installation of 64-bit libraries
e7184fff6d89903aed623860629a05047960ac2dvboxsync !endif
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
e7184fff6d89903aed623860629a05047960ac2dvboxsync !endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
78a072e1b56619e3230735ae073668311232ec94vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsyncdoneCr:
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync Pop $0
e7a38576d54d605f0a98a9646abb201ff8d995e4vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_WHQLFakeOn
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bFakeWHQL "true" do
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdo:
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Turning off WHQL protection..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"ignore$\"" "true"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_WHQLFakeOff
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bFakeWHQL "true" do
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdo:
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Turning back on WHQL protection..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"warn$\"" "true"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_InstallFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync
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"
1637773d6c473e4ab75812805ef00226f3a397c0vboxsync !endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
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"
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing drivers ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push $0 ; For fetching results
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoGuestDrv == "false"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing guest driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${Else}
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync ${LogVerbose} "Guest driver installation skipped!"
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoVideoDrv == "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bWithWDDM == "true"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${If} $g_strWinVersion == "8"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing WDDM video driver for Windows 8..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoW8.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${Else}
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing WDDM video driver for Windows Vista and 7..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoWddm.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync ${EndIf}
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing video driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${EndIf}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync ${LogVerbose} "Video driver installation skipped!"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
f66d485db7ca73331eabc7a7292879cfd174e7e0vboxsync ${If} $g_bNoMouseDrv == "false"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing mouse driver ..."
2a6dee1c3e13ae5593a603152c54711f204e2351vboxsync ; The mouse filter does not contain any device IDs but a "DefaultInstall" section;
2a6dee1c3e13ae5593a603152c54711f204e2351vboxsync ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented
2a6dee1c3e13ae5593a603152c54711f204e2351vboxsync ; with VBoxDrvInst's "driver executeinf" routine
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver executeinf $\"$INSTDIR\VBoxMouse.inf$\"" "false"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
b0cec57d51e48736a3303366c728c3f025e8e81bvboxsync ${LogVerbose} "Mouse driver installation skipped!"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Create the VBoxService service
78a072e1b56619e3230735ae073668311232ec94vboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing VirtualBox service ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"system32\VBoxService.exe$\" $\"Base$\"" "false"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsyncsf:
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Installing Shared Folders service ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Create the Shared Folders service ...
78a072e1b56619e3230735ae073668311232ec94vboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"system32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" "false"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add default network providers (if not present or corrupted)
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add WebClient" "false"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add LanmanWorkstation" "false"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add RDPNP" "false"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add the shared folders network provider
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Adding network provider (Order = $g_iSfOrder) ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF $g_iSfOrder" "false"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsynccropengl:
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ${If} $g_bWithWDDM == "true"
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ; Nothing to do here
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${Else}
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "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"
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${EndIf}
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync SetRegView 64
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync!endif
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${Endif}
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto done
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdone:
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_Main
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOverwrite on
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_Prepare
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_CopyFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_WHQLFakeOn
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_InstallFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_WHQLFakeOff
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Call W2K_SetVideoResolution
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro W2K_UninstallInstDir un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}W2K_UninstallInstDir
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxMouse.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxTray.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxGuest.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
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"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync !endif
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
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
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"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$%PATH_OUT%\bin\additions\VBoxDispD3D-x86.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
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
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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; WHQL fake
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef WHQL_FAKE
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxWHQLFake.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Log file
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\install.log"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\install_ui.log"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_UninstallInstDir ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_UninstallInstDir "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro W2K_Uninstall un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}W2K_Uninstall
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove VirtualBox video driver
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Uninstalling video driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideo.inf$\"" "true"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
6804e4c1c12ab612ad6257a4922309c476c204e5vboxsync
223a6730e81629b0bf552ccc31f119a998cc8e27vboxsync !if $%VBOX_WITH_WDDM_W8% == "1"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Uninstalling WDDM video driver for Windows 8..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\"" "true"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoW8" "true"
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
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Uninstalling WDDM video driver for Windows Vista and 7..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\"" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoWddm" "true"
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
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Removing Direct3D support ..."
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ; Do file validation before we uninstall
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Call ${un}ValidateD3DFiles
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Pop $0
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${If} $0 == "1" ; D3D files are invalid
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} $(VBOX_UNINST_INVALID_D3D)
f80e6bc7517cd2846b8b42c0b7da9293903f3244vboxsync MessageBox MB_ICONSTOP|MB_OK $(VBOX_UNINST_INVALID_D3D) /SD IDOK
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync Goto d3d_uninstall_end
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
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 ${EndIf}
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"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${EndIf}
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 ${EndIf}
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"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${EndIf}
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync
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
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 ${EndIf}
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"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${EndIf}
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 ${EndIf}
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"
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync ${EndIf}
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif ; amd64
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsyncd3d_uninstall_end:
7eff7a99cc12167a92df5ca1498fbbfeec3d0010vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove mouse driver
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Removing mouse driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxMouse" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry delmultisz $\"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}$\" $\"UpperFilters$\" $\"VBoxMouse$\"" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete the VBoxService service
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxService
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxService" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
223d0cc6ed8bf5767cb97c734684460b8eae31a8vboxsync ; VBoxGINA
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ${If} $0 == "VBoxGINA.dll"
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Removing auto-logon support ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ${EndIf}
be603ce3cb13b5ee7f4c3d85ea27ff41ac294535vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\VBoxGINA"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete VBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove guest driver
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Removing guest driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxGuest.inf$\"" "true"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" "true"
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
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove shared folders driver
4df0640e3f60845347b8c00d3b04a9fdecfef63cvboxsync ${LogVerbose} "Removing shared folders driver ..."
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider remove VBoxSF" "true"
59bb2da0ef97dc8c9d0821ac921728f515623ac5vboxsync ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxSF" "true"
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"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync