VBoxGuestAdditionsW2KXP.nsh revision 776a9dedd8f8af43eb7d5a18cac684b0276596fd
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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Registry path: $tmppath"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Registry path to device name: $temp"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Detected video device: $dev_desc"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${If} $dev_desc == "VirtualBox Graphics Adapter"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "No VirtualBox video device (yet) detected! No custom mode set."
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncchange_res:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Device description: $dev_desc"
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Device ID: $dev_id"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_device
78a072e1b56619e3230735ae073668311232ec94vboxsync Var /GLOBAL reg_path_monitor
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DetailPrint "Custom mode set: Platform is Windows $g_strWinVersion"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "2000"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${OrIf} $g_strWinVersion == "Vista"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_device "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0\Mon00000001"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${ElseIf} $g_strWinVersion == "XP"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${OrIf} $g_strWinVersion == "7"
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}
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DetailPrint "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
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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\VBCoInst.dll"
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
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxService.exe" ; Only used by W2K and up (for Shared Folders at the moment)
78a072e1b56619e3230735ae073668311232ec94vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${If} $g_bWithWDDM == "true"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ; WDDM Video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync SetOutPath "$INSTDIR"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !ifdef VBOX_SIGN_ADDITIONS
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.cat"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync !endif
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.sys"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideoWddm.inf"
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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Turning off WHQL protection..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "ignore"'
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction W2K_WHQLFakeOff
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bFakeWHQL "true" do
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncdo:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Turning back on WHQL protection..."
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "warn"'
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"
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
e0adfb501c7b93b2d26c01286b43f82996fb4a2avboxsync DetailPrint "Installing drivers ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Push $0 ; For fetching results
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$INSTDIR"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bNoGuestDrv <> "true"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync StrCmp $g_bNoGuestDrv "true" drv_video
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing guest driver ..."
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxGuest.inf"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Guest driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${Else}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Guest driver installation skipped!"
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bNoVideoDrv <> "true"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bWithWDDM == "true"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing WDDM video driver ..."
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing video driver ..."
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideo.inf"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${EndIf}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Video driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Video driver installation skipped!"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${If} $g_bNoMouseDrv <> "true"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing mouse driver ..."
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; The mouse filter does not contain any device IDs but a "DefaultInstall" section;
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ; with VBoxDrvInst's "driver executeinf" routine
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver executeinf "$INSTDIR\VBoxMouse.inf"'
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync Pop $0 ; Ret value
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "Mouse driver returned: $0"
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync ${Else}
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync LogText "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!
776a9dedd8f8af43eb7d5a18cac684b0276596fdvboxsync DetailPrint "Installing VirtualBox service ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "VBoxService returned: $0"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "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!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'
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)
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add WebClient'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add LanmanWorkstation'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add RDPNP'
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Add the shared folders network provider
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Adding network provider (Order = $g_iSfOrder) ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF $g_iSfOrder'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsynccropengl:
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ${If} $g_bWithWDDM == "true"
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ; Nothing to do here
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync ${Else}
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync DetailPrint "Installing 3D OpenGL support ..."
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "DriverVersion" 1
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Flags" 1
0614bee07b5f88aa8803df43fde6d7185a9a7fffvboxsync WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Dll" "VBoxOGL.dll"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync!if $%BUILD_TARGET_ARCH% == "amd64"
3de7a84aae02a6469ddfcc184f4f819f37774b63vboxsync SetRegView 32
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ; Write additional keys required for Windows XP, Vista and 7 64-bit (but for 32-bit stuff)
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync ${If} $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
78a072e1b56619e3230735ae073668311232ec94vboxsyncerror:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Abort "ERROR: Could not install files for Windows 2000 / XP / Vista! Installation aborted."
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
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
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"
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
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Uninstalling video driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideo.inf'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Remove video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Uninstalling WDDM video driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoWddm'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideoWddm.sys"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxDispD3D.dll"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Removing 3D graphics support ..."
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
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync IfFileExists "$g_strSystemDir\dllcache\msd3d8.dll" 0 +2
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d8.dll" "$g_strSystemDir\dllcache\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync IfFileExists g_strSystemDir\dllcache\msd3d9.dll" 0 +2
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\dllcache\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\dllcache\msd3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; Restore original DX DLLs
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync IfFileExists "$g_strSystemDir\msd3d8.dll" 0 +2
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d8.dll" "$g_strSystemDir\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync IfFileExists "$g_strSystemDir\msd3d9.dll" 0 +2
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Delete /REBOOTOK "$g_strSystemDir\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync Rename /REBOOTOK "$g_strSystemDir\msd3d9.dll" "$g_strSystemDir\d3d9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
78a072e1b56619e3230735ae073668311232ec94vboxsync
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
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"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync Rename /REBOOTOK "$SYSDIR\msd3d9.dll" "$SYSDIR\d3d9.dll"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${DisableX64FSRedirection}
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif ; amd64
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; VBOX_WITH_CROGL
78a072e1b56619e3230735ae073668311232ec94vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove mouse driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing mouse driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxMouse'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete the VBoxService service
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxService
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; GINA
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxGINA.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ${If} $0 == "VBoxGINA.dll"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing GINA ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ${EndIf}
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Delete VBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Call ${un}StopVBoxTray
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; Remove guest driver
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing guest driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxGuest.inf"'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync ; @todo Add error handling here!
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\vbcoinst.dll"
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
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync DetailPrint "Removing shared folders driver ..."
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider remove VBoxSF'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxSF'
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Pop $0 ; Ret value
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked
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