VirtualBox

Changeset 39492 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Dec 1, 2011 2:42:21 PM (13 years ago)
Author:
vboxsync
Message:

Windows Guest Additions installer/D3D: Relative jump fixes, check for file existence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r39491 r39492  
    734734SectionEnd
    735735
    736 ; Prepares the access rights for replacing a WRP protected file
     736; Prepares the access rights for replacing
     737; a WRP (Windows Resource Protection) protected file
    737738Function PrepareWRPFile
    738739
    739740  Pop $0
    740741
    741   IfFileExists "$g_strSystemDir\takeown.exe" 0 +2
     742  IfFileExists "$0" +3 +1
     743    LogText "WRP: File $0 does not exist, skipping"
     744    Return
     745
     746  IfFileExists "$g_strSystemDir\takeown.exe" +1 +4
    742747    nsExec::ExecToLog '"$g_strSystemDir\takeown.exe" /F "$0"'
     748    Pop $1 ; Ret value
     749    LogText "WRP: Taking ownership for $0 returned: $1"
     750
    743751  AccessControl::SetFileOwner "$0" "(S-1-5-32-545)"
    744752  Pop $1
    745   DetailPrint "Setting file owner for $0 returned $1"
     753  DetailPrint "WRP: Setting file owner for $0 returned: $1"
     754
    746755  AccessControl::GrantOnFile "$0" "(S-1-5-32-545)" "FullAccess"
    747756  Pop $1
    748   DetailPrint "Setting access rights for $0 returned $1"
     757  DetailPrint "WRP: Setting access rights for $0 returned: $1"
    749758
    750759!if $%VBOX_WITH_GUEST_INSTALL_HELPER% == "1"
     
    752761    VBoxGuestInstallHelper::DisableWFP "$0"
    753762    Pop $1 ; Get return value (ignored for now)
    754     DetailPrint "Setting WFP exception for $0 returned $1"
     763    DetailPrint "WRP: Setting WFP exception for $0 returned: $1"
    755764  !endif
    756765!endif
     
    785794  ; Update DLL cache
    786795  SetOutPath "$g_strSystemDir\dllcache"
    787   IfFileExists "$g_strSystemDir\dllcache\msd3d8.dll" +1
     796  IfFileExists "$g_strSystemDir\dllcache\msd3d8.dll" +2
    788797    CopyFiles /SILENT "$g_strSystemDir\dllcache\d3d8.dll" "$g_strSystemDir\dllcache\msd3d8.dll"
    789   IfFileExists "$g_strSystemDir\dllcache\msd3d9.dll" +1
     798  IfFileExists "$g_strSystemDir\dllcache\msd3d9.dll" +2
    790799    CopyFiles /SILENT "$g_strSystemDir\dllcache\d3d9.dll" "$g_strSystemDir\dllcache\msd3d9.dll"
    791800
     
    806815  ; Save original DLLs (only if msd3d*.dll does not exist) ...
    807816  SetOutPath $g_strSystemDir
    808   IfFileExists "$g_strSystemDir\msd3d8.dll" +1
     817  IfFileExists "$g_strSystemDir\msd3d8.dll" +2
    809818    CopyFiles /SILENT "$g_strSystemDir\d3d8.dll" "$g_strSystemDir\msd3d8.dll"
    810   IfFileExists "$g_strSystemDir\msd3d9.dll" +1
     819  IfFileExists "$g_strSystemDir\msd3d9.dll" +2
    811820    CopyFiles /SILENT "$g_strSystemDir\d3d9.dll" "$g_strSystemDir\msd3d9.dll"
    812821
     
    842851    ; Save original DLLs (only if msd3d*.dll does not exist) ...
    843852    SetOutPath "$SYSDIR\dllcache"
    844     IfFileExists "$SYSDIR\dllcache\msd3d8.dll" +1
     853    IfFileExists "$SYSDIR\dllcache\msd3d8.dll" +2
    845854      CopyFiles /SILENT "$SYSDIR\dllcache\d3d8.dll" "$SYSDIR\dllcache\msd3d8.dll"
    846     IfFileExists "$SYSDIR\dllcache\msd3d9.dll" +1
     855    IfFileExists "$SYSDIR\dllcache\msd3d9.dll" +2
    847856      CopyFiles /SILENT "$SYSDIR\dllcache\d3d9.dll" "$SYSDIR\dllcache\msd3d9.dll"
    848857
     
    867876    ; Save original DLLs (only if msd3d*.dll does not exist) ...
    868877    SetOutPath $SYSDIR
    869     IfFileExists "$SYSDIR\msd3d8.dll" +1
     878    IfFileExists "$SYSDIR\msd3d8.dll" +2
    870879      CopyFiles /SILENT "$SYSDIR\d3d8.dll" "$SYSDIR\msd3d8.dll"
    871     IfFileExists "$SYSDIR\msd3d9.dll" +1
     880    IfFileExists "$SYSDIR\msd3d9.dll" +2
    872881      CopyFiles /SILENT "$SYSDIR\d3d9.dll" "$SYSDIR\msd3d9.dll"
    873882
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette