VBoxGuestAdditionsCommon.nsh revision 94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifndef UNINSTALLER_ONLY
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ExtractFiles
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; @todo: Use a define for all the file specs to group the files per module
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; and keep the redundancy low
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy "$0" "$INSTDIR\$%BUILD_TARGET_ARCH%"
78a072e1b56619e3230735ae073668311232ec94vboxsync
94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58vboxsync ; Root files
94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58vboxsync SetOutPath "$0"
d0318084c32279bf313f47358242cd61ada858d6vboxsync!if $%VBOX_WITH_LICENSE_INSTALL_RTF% == "1"
94c538a65fbdfa1ea06f4fe0a65599c1ab0fed58vboxsync FILE "/oname=${LICENSE_FILE_RTF}" "$%VBOX_BRAND_LICENSE_RTF%"
d5d45608052fd506e4114bf112df6efae7fcd8a7vboxsync!endif
d5d45608052fd506e4114bf112df6efae7fcd8a7vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Video driver
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxVideo"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.inf"
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef VBOX_SIGN_ADDITIONS
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxVideo.cat"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%VBOX_WITH_CROGL% == "1"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; crOpenGL
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
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync SetOutPath "$0\VBoxVideo\OpenGL"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync FILE "$%PATH_OUT%\bin\additions\d3d8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync FILE "$%PATH_OUT%\bin\additions\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync !if $%BUILD_TARGET_ARCH% == "x86"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; libWine is used for 32bit d3d only
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync ; @todo: remove it for 32bit as well
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\libWine.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D8.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxD3D9.dll"
2d86fd6bcfe35a4bb83bb8a4fe68090693cdce95vboxsync FILE "$%PATH_OUT%\bin\additions\wined3d.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync !if $%BUILD_TARGET_ARCH% == "amd64"
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Only 64-bit installer: Also copy 32-bit DLLs on 64-bit target
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxVideo\OpenGL\SysWow64"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\libWine.dll"
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 FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D8.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D9.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\wined3d.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync !endif
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ; WDDM Video driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync SetOutPath "$0\VBoxVideoWddm"
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"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync!endif ; $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Mouse driver
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxMouse"
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!if $%BUILD_TARGET_ARCH% == "x86"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxMouse\NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMouseNT.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Guest driver
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxGuest"
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 FILE "$%PATH_OUT%\bin\additions\VBCoInst.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxHook.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%BUILD_TARGET_ARCH% == "x86"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxGuest\NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuestNT.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; VBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\Bin"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%BUILD_TARGET_ARCH% == "x86"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxServiceNT.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Shared Folders
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\VBoxSF"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxSF.sys"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Auto-Logon
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\AutoLogon"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGINA.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxCredProv.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Misc tools
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\Tools"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe"
c3d2b15ad840b405062f4c2c6b127d6fc107c7b2vboxsync FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!if $%BUILD_TARGET_ARCH% == "x86"
78a072e1b56619e3230735ae073668311232ec94vboxsync SetOutPath "$0\Tools\NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif ; UNINSTALLER_ONLY
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro EnableLog un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}EnableLog
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto log
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bLogEnable "true" log
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsynclog:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync LogSet on
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Start logging."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro EnableLog ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro EnableLog "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro WriteLogUI un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}WriteLogUI
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync IfSilent exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto log
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $g_bLogEnable "true" log
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsynclog:
78a072e1b56619e3230735ae073668311232ec94vboxsync
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync ; Dump log to see what happened
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $0 "$INSTDIR\${un}install_ui.log"
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}DumpLog
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro WriteLogUI ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro WriteLogUI "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!macro WriteLogVBoxTray un
cc260ed3418d1fd2771d0395f818f76808b60238vboxsyncFunction ${un}WriteLogVBoxTray
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; Pop function parameters off the stack
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; in reverse order
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Exch $1 ; Message type (0=Info, 1=Warning, 2=Error)
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Exch
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Exch $0 ; Body string
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; @todo Add more paramters here!
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!if $%VBOX_WITH_GUEST_INSTALL_HELPER% == "1"
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ${If} $g_bPostInstallStatus == "true"
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; Parameters:
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; - String: Description / Body
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; - String: Title / Name of application
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; - Integer: Type of message: 0 (Info), 1 (Warning), 2 (Error)
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; - Integer: Time (in msec) to show the notification
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync VBoxGuestInstallHelper::VBoxTrayShowBallonMsg "$0" "VirtualBox Guest Additions Setup" $1 5000
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Pop $0 ; Get return value (ignored for now)
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ${EndIf}
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!endif
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Pop $0
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync Pop $1
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync
cc260ed3418d1fd2771d0395f818f76808b60238vboxsyncFunctionEnd
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!macroend
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!insertmacro WriteLogVBoxTray ""
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync!insertmacro WriteLogVBoxTray "un."
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!macro CheckArchitecture un
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsyncFunction ${un}CheckArchitecture
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Push $0
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync System::Call "kernel32::GetCurrentProcess() i .s"
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync System::Call "kernel32::IsWow64Process(i s, *i .r0)"
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync ; R0 now contains 1 if we're a 64-bit process, or 0 if not
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!if $%BUILD_TARGET_ARCH% == "amd64"
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync IntCmp $0 0 wrong_platform
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!else ; 32-bit
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync IntCmp $0 1 wrong_platform
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!endif
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Push 0
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Goto exit
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsyncwrong_platform:
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Push 1
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Goto exit
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsyncexit:
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsyncFunctionEnd
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!macroend
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!insertmacro CheckArchitecture ""
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync!insertmacro CheckArchitecture "un."
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro GetWindowsVer un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}GetWindowsVer
78a072e1b56619e3230735ae073668311232ec94vboxsync
cc260ed3418d1fd2771d0395f818f76808b60238vboxsync ; Check if we are running on w2k or above
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ; For other windows versions (>XP) it may be necessary to change winver.nsh
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}GetWindowsVersion
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $R3 ; Windows Version
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $R3 ; The windows version string
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "NT" ; String to search for. Win 2k family returns no string containing 'NT'
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStr
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $R0
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync StrCmp $R0 '' nt5plus ; Not NT 3.XX or 4.XX
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Ok we know it is NT. Must be a string like NT X.XX
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $R3 ; The windows version string
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "4." ; String to search for
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStr
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $R0
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync StrCmp $R0 "" nt5plus nt4 ; If empty -> not NT 4
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsyncnt5plus: ; Windows 2000+ (XP, Vista, ...)
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync StrCpy $g_strWinVersion $R3
78a072e1b56619e3230735ae073668311232ec94vboxsync goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsyncnt4: ; NT 4.0
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync StrCpy $g_strWinVersion "NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync goto exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro GetWindowsVer ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro GetWindowsVer "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro GetAdditionsVersion un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}GetAdditionsVersion
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $1
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Get additions version
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $0 HKLM "SOFTWARE\$%VBOX_VENDOR_SHORT%\VirtualBox Guest Additions" "Version"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Get revision
78a072e1b56619e3230735ae073668311232ec94vboxsync ReadRegStr $g_strAddVerRev HKLM "SOFTWARE\$%VBOX_VENDOR_SHORT%\VirtualBox Guest Additions" "Revision"
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Extract major version
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "$0" ; String
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "." ; SubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; SearchDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "<" ; StrInclusionDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; IncludeSubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; Loops
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStrAdv
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $g_strAddVerMaj
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Extract minor version
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "$0" ; String
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "." ; SubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; SearchDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; StrInclusionDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; IncludeSubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; Loops
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStrAdv
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $1 ; Got first part (e.g. "1.5")
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "$1" ; String
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "." ; SubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; SearchDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "<" ; StrInclusionDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; IncludeSubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; Loops
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStrAdv
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $g_strAddVerMin ; Extracted second part (e.g. "5" from "1.5")
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Extract build number
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "$0" ; String
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "." ; SubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "<" ; SearchDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push ">" ; StrInclusionDirection
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; IncludeSubString
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; Loops
78a072e1b56619e3230735ae073668311232ec94vboxsync Push "0" ; CaseSensitive
78a072e1b56619e3230735ae073668311232ec94vboxsync Call ${un}StrStrAdv
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $g_strAddVerBuild
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $1
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro GetAdditionsVersion ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro GetAdditionsVersion "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro StopVBoxService un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}StopVBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0 ; Temp results
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $1
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $2 ; Image name of VBoxService
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $3 ; Safety counter
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $3 "0" ; Init counter
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Stopping VBoxService ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncsvc_stop:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Stopping VBoxService (as service) ..."
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::Exec '"$SYSDIR\net.exe" stop VBoxService'
78a072e1b56619e3230735ae073668311232ec94vboxsync ${Else}
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::Exec '"$SYSDIR\SC.exe" stop VBoxService'
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync Sleep "1000" ; Wait a bit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexe_stop:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!ifdef _DEBUG
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Stopping VBoxService (as exe) ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync!endif
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexe_stop_loop:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $3 10 exit ; Only try this loop 10 times max
78a072e1b56619e3230735ae073668311232ec94vboxsync IntOp $3 $3 + 1 ; Increment
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync LogText "Try: $3"
78a072e1b56619e3230735ae073668311232ec94vboxsync
f001a45ec92f71f1e4c1015485fc1ddf84e8059cvboxsync ${If} $g_strWinVersion == "NT4"
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $2 "VBoxServiceNT.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${Else}
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $2 "VBoxService.exe"
78a072e1b56619e3230735ae073668311232ec94vboxsync ${EndIf}
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${nsProcess::FindProcess} $2 $0
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $0 0 0 exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${nsProcess::KillProcess} $2 $0
78a072e1b56619e3230735ae073668311232ec94vboxsync Sleep "1000" ; Wait a bit
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exe_stop_loop
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Stopping VBoxService done."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $3
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $2
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $1
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro StopVBoxService ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro StopVBoxService "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro StopVBoxTray un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}StopVBoxTray
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0 ; Temp results
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $1 ; Safety counter
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCpy $1 "0" ; Init counter
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Stopping VBoxTray ..."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexe_stop:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync IntCmp $1 10 exit ; Only try this loop 10 times max
78a072e1b56619e3230735ae073668311232ec94vboxsync IntOp $1 $1 + 1 ; Increment
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${nsProcess::FindProcess} "VBoxTray.exe" $0
78a072e1b56619e3230735ae073668311232ec94vboxsync StrCmp $0 0 0 exit
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ${nsProcess::KillProcess} "VBoxTray.exe" $0
78a072e1b56619e3230735ae073668311232ec94vboxsync Sleep "1000" ; Wait a bit
78a072e1b56619e3230735ae073668311232ec94vboxsync Goto exe_stop
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncexit:
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync DetailPrint "Stopping VBoxTray done."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $1
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro StopVBoxTray ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro StopVBoxTray "un."
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro WriteRegBinR ROOT KEY NAME VALUE
78a072e1b56619e3230735ae073668311232ec94vboxsync WriteRegBin "${ROOT}" "${KEY}" "${NAME}" "${VALUE}"
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync!macro AbortShutdown un
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunction ${un}AbortShutdown
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Push $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync ; Try to abort the shutdown
78a072e1b56619e3230735ae073668311232ec94vboxsync nsExec::ExecToLog '"$g_strSystemDir\shutdown.exe" -a' $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsync Pop $0
78a072e1b56619e3230735ae073668311232ec94vboxsync
78a072e1b56619e3230735ae073668311232ec94vboxsyncFunctionEnd
78a072e1b56619e3230735ae073668311232ec94vboxsync!macroend
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro AbortShutdown ""
78a072e1b56619e3230735ae073668311232ec94vboxsync!insertmacro AbortShutdown "un."
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!macro CheckForWDDMCapability un
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsyncFunction ${un}CheckForWDDMCapability
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
b9efdf4f2f5a547f76dc2e254656d83cab80ce73vboxsync!if $%VBOX_WITH_WDDM% == "1"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ; If we're on a 32-bit Windows Vista / 7 we can use the WDDM driver
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${If} $g_strWinVersion == "Vista"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${OrIf} $g_strWinVersion == "7"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync StrCpy $g_bCapWDDM "true"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync ${EndIf}
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!endif
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsyncFunctionEnd
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!macroend
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!insertmacro CheckForWDDMCapability ""
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!insertmacro CheckForWDDMCapability "un."
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!macro CheckForCapabilities un
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsyncFunction ${un}CheckForCapabilities
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Push $0
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync ; Retrieve system mode and store result in
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync System::Call 'user32::GetSystemMetrics(i ${SM_CLEANBOOT}) i .r0'
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync StrCpy $g_iSystemMode $0
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync ; Check whether this OS is capable of handling WDDM drivers
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Call ${un}CheckForWDDMCapability
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync
f06e830c9fdbc3d9e89867d4429404c5446bc513vboxsync Pop $0
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsyncFunctionEnd
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!macroend
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!insertmacro CheckForCapabilities ""
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync!insertmacro CheckForCapabilities "un."
3f6d4775faa373634b2f3fc2a90fc517733f6fd6vboxsync