VBoxGuestAdditionsNT4.nsh revision c3d2b15ad840b405062f4c2c6b127d6fc107c7b2
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncFunction NT4_SetVideoResolution
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync ; Check for all required parameters
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync StrCmp $g_iScreenX "0" missingParms
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.BitsPerPel" $g_iScreenBpp
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.Flags" 0x00000000
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.VRefresh" 0x00000001
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.XPanning" 0x00000000
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.XResolution" $g_iScreenX
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.YPanning" 0x00000000
WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\vboxvideo\Device0" "DefaultSettings.YResolution" $g_iScreenY
; "VBoxMouseNT.sys" as the original i8042prt driver which obviously isn't there
; overwrite it with the VBoxMouseNT.sys
Delete /REBOOTOK "$INSTDIR\VBoxService.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxDisp.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxTray.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxHook.dll"
FILE "$%PATH_OUT%\bin\additions\VBoxControl.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxServiceNT.exe"
FILE "$%PATH_OUT%\bin\additions\VBoxVideo.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxMouseNT.sys"
FILE "$%PATH_OUT%\bin\additions\VBoxGuestNT.sys"
;FILE "$%PATH_OUT%\bin\additions\VBoxSFNT.sys" ; Shared Folders not available on NT4!
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxGuest" "VBoxGuest Support Driver" 1 1 "$SYSDIR\drivers\VBoxGuestNT.sys" "Base"'
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxGuest" "ImagePath" "System32\Drivers\VBoxGuestNT.sys"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxTray" '"$SYSDIR\VBoxTray.exe"'
nsExec::ExecToLog '"$INSTDIR\VBoxGuestDrvInst.exe" /i'
; No need to stop/remove the service here! Do this only on uninstallation!
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxServiceNT.exe" "Base"'
;nsSCM::Install /NOUNLOAD "VBoxSF" "VirtualBox Shared Folders" 1 1 "$SYSDIR\drivers\VBoxSFNT.sys" "Network" "" "" ""
;DetailPrint "SCM::Install VBoxSFNT.sys: $0"
;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
;nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxGuestInst" '"$INSTDIR\RegCleanup.exe"'
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" "System32\DRIVERS\VBoxMouseNT.sys"
Delete /REBOOTOK "$INSTDIR\VBoxGuestDrvInst.exe"
Delete /REBOOTOK "$INSTDIR\RegCleanup.exe"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'
Delete /REBOOTOK "$SYSDIR\drivers\VBoxGuestNT.sys"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService'
Delete /REBOOTOK "$SYSDIR\VBoxServiceNT.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxTrayDel" "$SYSDIR\cmd.exe /c del /F /Q $SYSDIR\VBoxTray.exe"
Delete /REBOOTOK "$SYSDIR\VBoxTray.exe" ; If it can't be removed cause it's running, try next boot with "RunOnce" key above!
Delete /REBOOTOK "$SYSDIR\VBoxHook.dll"
Delete /REBOOTOK "$SYSDIR\VBoxControl.exe"
nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'
Delete /REBOOTOK "$SYSDIR\drivers\VBoxVideo.sys"
Delete /REBOOTOK "$SYSDIR\VBoxDisp.dll"
${If} $0 == "System32\DRIVERS\VBoxMouseNT.sys"
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" "System32\DRIVERS\i8042prt.sys"
Delete /REBOOTOK "$SYSDIR\drivers\VBoxMouseNT.sys"