VBoxGuestAdditionsW2KXP.nsh revision 78a072e1b56619e3230735ae073668311232ec94
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 win_ver
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 Call GetWindowsVersion
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $win_ver ; Now contains Windows version
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
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "$tmp" ; String
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "\" ; SubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; SearchDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; StrInclusionDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; IncludeSubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "2" ; Loops
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call StrStrAdv
78a072e1b56619e3230735ae073668311232ec94vboxsync 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 ...
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $win_ver "2000" 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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Custom mode set: Platform is '$win_ver'."
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $win_ver == "2000"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${OrIf} $win_ver == "Vista"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0\Mon00000001"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${ElseIf} $win_ver == "XP"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${OrIf} $win_ver == "7"
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 DetailPrint "Custom mode set: Platform '$win_ver' not supported yet."
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
78a072e1b56619e3230735ae073668311232ec94vboxsync 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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Stop / kill VBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync Call StopVBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Stop / kill VBoxTray
78a072e1b56619e3230735ae073668311232ec94vboxsync 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\VBCoInst.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync 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)
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath $g_strSystemDir
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLarrayspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLcrutil.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLerrorspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLpassthroughspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGLfeedbackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxOGL.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target arch in
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Wow64 node (32-bit sub system).
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EnableX64FSRedirection}
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath $SYSDIR
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLarrayspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLcrutil.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLerrorspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLpassthroughspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGLfeedbackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxOGL.dll"
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"
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 DetailPrint "Installing Drivers..."
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bNoVideoDrv "true" drv_guest
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing video driver ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00" "$INSTDIR\VBoxVideo.inf" "Display"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Video driver result: $0"
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bNoGuestDrv "true" drv_mouse
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing guest driver ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /i "PCI\VEN_80EE&DEV_CAFE&SUBSYS_00000000&REV_00" "$INSTDIR\VBoxGuest.inf" "Media"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Guest driver result: $0"
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bNoMouseDrv "true" vbox_service
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing mouse filter ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /inf "$INSTDIR\VBoxMouse.inf"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Mouse driver returned: $0"
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsyncvbox_service:
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing VirtualBox service ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Create the VBoxService service
78a072e1b56619e3230735ae073668311232ec94vboxsync ; No need to stop/remove the service here! Do this only on uninstallation!
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
78a072e1b56619e3230735ae073668311232ec94vboxsync 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!
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /createsvc "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)
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider WebClient'
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider LanmanWorkstation'
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider RDPNP'
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add the shared folders network provider
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Adding network provider (Order = $g_iSfOrder) ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /addnetprovider VBoxSF $g_iSfOrder'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Installing 3D OpenGL support ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Write additional keys required for Windows 7 & XP 64-bit (but for 32-bit stuff)
78a072e1b56619e3230735ae073668311232ec94vboxsync Call GetWindowsVersion
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $R0 ; Windows Version
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $R0 == '7'
78a072e1b56619e3230735ae073668311232ec94vboxsync ${OrIf} $R0 == 'XP'
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegDWORD HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegStr HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
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"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBCoInst.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxControl.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$INSTDIR\VBoxService.exe" ; File from an older installation maybe, not present here anymore
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
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove VirtualBox graphics adapter & PCI base drivers
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /u "PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add error handling here!
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /u "PCI\VEN_80EE&DEV_CAFE&SUBSYS_00000000&REV_00"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add error handling here!
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo restore old drivers
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove video driver
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxVideo'
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove mouse driver
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxMouse'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /reg_delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add error handling here!
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete the VBoxService service
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StopVBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxService'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $0 == "VBoxGINA.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Delete VBoxTray
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StopVBoxTray
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove guest driver
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxGuest'
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\vbcoinst.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxTray.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxHook.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" ; Remove VBoxTray autorun
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxControl.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove shared folders driver
78a072e1b56619e3230735ae073668311232ec94vboxsync call ${un}RemoveProvider ; Remove Shared Folders network provider from registry
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add a /delnetprovider to VBoxDrvInst for doing this job!
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" /delsvc VBoxSF'
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxSF.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Removing 3D graphics support ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync !if $%BUILD_TARGET_ARCH% == "x86"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLarrayspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLcrutil.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLerrorspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLpassthroughspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGLfeedbackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxOGL.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove D3D stuff
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo add a feature flag to only remove if installed explicitly
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\libWine.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxD3D9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\wined3d.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Update DLL cache
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$g_strSystemDir\dllcache\msd3d8.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d8.dll" "$g_strSystemDir\dllcache\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists g_strSystemDir\dllcache\msd3d9.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Restore original DX DLLs
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$g_strSystemDir\msd3d8.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d8.dll" "$g_strSystemDir\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$g_strSystemDir\msd3d9.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d9.dll" "$g_strSystemDir\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync !else ; amd64
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Only 64-bit installer: Also remove 32-bit DLLs on 64-bit target arch in Wow64 node
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EnableX64FSRedirection}
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLarrayspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLcrutil.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLerrorspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLpackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLpassthroughspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGLfeedbackspu.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxOGL.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove D3D stuff
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo add a feature flag to only remove if installed explicitly
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\libWine.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxD3D8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\VBoxD3D9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\wined3d.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Update DLL cache
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$SYSDIR\dllcache\msd3d8.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\dllcache\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$SYSDIR\dllcache\msd3d8.dll" "$SYSDIR\dllcache\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$SYSDIR\dllcache\msd3d9.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\dllcache\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$SYSDIR\dllcache\msd3d9.dll" "$SYSDIR\dllcache\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Restore original DX DLLs
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$SYSDIR\msd3d8.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$SYSDIR\msd3d8.dll" "$SYSDIR\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync IfFileExists "$SYSDIR\msd3d9.dll" 0 +2
78a072e1b56619e3230735ae073668311232ec94vboxsync Delete /REBOOTOK "$SYSDIR\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync Rename /REBOOTOK "$SYSDIR\msd3d9.dll" "$SYSDIR\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${DisableX64FSRedirection}
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif ; amd64
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro W2K_Uninstall "un."