VirtualBox

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


Ignore:
Timestamp:
Aug 29, 2012 11:56:11 AM (12 years ago)
Author:
vboxsync
Message:

Windows Guest Additions installer: Fixed installation of VBoxService while still running.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh

    r43066 r43069  
    203203
    204204  ; VBoxService
    205   FILE "$%PATH_OUT%\bin\additions\VBoxService.exe" ; Only used by W2K and up (for Shared Folders at the moment)
     205  ${If} $g_bNoVBoxServiceExit == "false"
     206    ; VBoxService has been terminated before, so just install the file
     207    ; in the regular way
     208    FILE "$%PATH_OUT%\bin\additions\VBoxService.exe"
     209  ${Else}
     210    ; VBoxService is in use and wasn't terminated intentionally. So extract the
     211    ; new version into a temporary location and install it on next reboot
     212    Push $0
     213    ClearErrors
     214    GetTempFileName $0
     215    IfErrors 0 +3
     216      DetailPrint "Error getting temp file for VBoxService.exe"
     217      StrCpy "$0" "$INSTDIR\VBoxServiceTemp.exe"
     218    DetailPrint "VBoxService is in use, will be installed on next reboot (from '$0')"
     219    File "/oname=$0" "$%PATH_OUT%\bin\additions\VBoxService.exe"
     220    IfErrors 0 +2
     221      DetailPrint "Error copying VBoxService.exe to '$0'"
     222    Rename /REBOOTOK "$0" "$g_strSystemDir\VBoxService.exe"
     223    IfErrors 0 +2
     224      DetailPrint "Error renaming '$0' to '$g_strSystemDir\VBoxService.exe'"
     225    Pop $0
     226  ${EndIf}
    206227
    207228!if $%VBOX_WITH_WDDM% == "1"
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