VirtualBox

Changeset 109221 in vbox


Ignore:
Timestamp:
May 9, 2025 11:06:30 AM (10 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168800
Message:

Windows Guest Additions: Allow installing Shared Folders when forced mode (/force) is being specified. Allows testing builds from build boxes more easily.

File:
1 edited

Legend:

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

    r109164 r109221  
    564564  ;
    565565  ${LogVerbose} "Installing Shared Folders driver ..."
     566
     567  ; For Win/arm we currently skip installing Shared Folders by default due to stability issues.
    566568  !if $%KBUILD_TARGET_ARCH% == "arm64"
    567     ${LogVerbose} "Shared Folders are not available on this platform architecture (arm64), skipping installation."
     569    ${If} $g_bForceInstall <> "true"
     570      ${LogVerbose} "Shared Folders are not available on this platform architecture (arm64), skipping installation."
     571      goto skip_sf
     572    ${Endif}
     573  !endif
     574
     575  ; The Shared Folder IFS goes to the system directory.
     576  !if $%KBUILD_TARGET_ARCH% == "x86"
     577    ; On x86 we have to use a different shared folder driver linked against an older RDBSS for Windows 7 and older.
     578    ${If}     ${AtLeastWin2000}
     579    ${AndIf}  ${AtMostWin7}
     580      !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSFW2K.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     581    ${ElseIf} ${AtLeastWin8}
     582      !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     583    ${EndIf}
    568584  !else
    569     ; The Shared Folder IFS goes to the system directory.
    570     !if $%KBUILD_TARGET_ARCH% == "x86"
    571       ; On x86 we have to use a different shared folder driver linked against an older RDBSS for Windows 7 and older.
    572       ${If}     ${AtLeastWin2000}
    573       ${AndIf}  ${AtMostWin7}
    574         !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSFW2K.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
    575       ${ElseIf} ${AtLeastWin8}
    576         !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
    577       ${EndIf}
    578     !else
    579       !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
    580     !endif
    581     AccessControl::GrantOnFile "$g_strSystemDir\drivers\VBoxSF.dll" "(BU)" "GenericRead"
    582 
    583     !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
    584     AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
    585     !if $%KBUILD_TARGET_ARCH% == "amd64" ; Note: Does not exist for arm64.
    586       ; Only amd64 installer: Copy the x86 DLL for 32 bit applications.
    587       !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxMRXNP-x86.dll" "$g_strSysWow64\VBoxMRXNP.dll" "$INSTDIR"
    588       AccessControl::GrantOnFile "$g_strSysWow64\VBoxMRXNP.dll" "(BU)" "GenericRead"
    589     !endif
    590 
    591     ; Create the Shared Folders service ...
    592     ; No need to stop/remove the service here! Do this only on uninstallation!
    593     ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"\SystemRoot\System32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" 'non-zero-exitcode=abort'
    594 
    595     ; ... and the link to the network provider
    596     WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
    597     WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
    598     WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
    599 
    600     ; Add default network providers (if not present or corrupted)
    601     ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add WebClient"         'non-zero-exitcode=abort'
    602     ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add LanmanWorkstation" 'non-zero-exitcode=abort'
    603     ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add RDPNP"             'non-zero-exitcode=abort'
    604 
    605     ; Add the shared folders network provider
    606     ${LogVerbose} "Adding network provider (Order = $g_iSfOrder) ..."
    607     ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add VBoxSF $g_iSfOrder" 'non-zero-exitcode=abort'
    608   !endif ; $%KBUILD_TARGET_ARCH% == "arm64"
     585    !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxSF.sys" "$g_strSystemDir\drivers\VBoxSF.sys" "$INSTDIR"
     586  !endif
     587  AccessControl::GrantOnFile "$g_strSystemDir\drivers\VBoxSF.dll" "(BU)" "GenericRead"
     588
     589  !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxMRXNP.dll" "$g_strSystemDir\VBoxMRXNP.dll" "$INSTDIR"
     590  AccessControl::GrantOnFile "$g_strSystemDir\VBoxMRXNP.dll" "(BU)" "GenericRead"
     591  !if $%KBUILD_TARGET_ARCH% == "amd64" ; Note: Does not exist for arm64.
     592    ; Only amd64 installer: Copy the x86 DLL for 32 bit applications.
     593    !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED "$%PATH_OUT%\bin\additions\VBoxMRXNP-x86.dll" "$g_strSysWow64\VBoxMRXNP.dll" "$INSTDIR"
     594    AccessControl::GrantOnFile "$g_strSysWow64\VBoxMRXNP.dll" "(BU)" "GenericRead"
     595  !endif
     596
     597  ; Create the Shared Folders service ...
     598  ; No need to stop/remove the service here! Do this only on uninstallation!
     599  ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"\SystemRoot\System32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" 'non-zero-exitcode=abort'
     600
     601  ; ... and the link to the network provider
     602  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "DeviceName" "\Device\VBoxMiniRdr"
     603  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "Name" "VirtualBox Shared Folders"
     604  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\VBoxSF\NetworkProvider" "ProviderPath" "$SYSDIR\VBoxMRXNP.dll"
     605
     606  ; Add default network providers (if not present or corrupted)
     607  ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add WebClient"         'non-zero-exitcode=abort'
     608  ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add LanmanWorkstation" 'non-zero-exitcode=abort'
     609  ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add RDPNP"             'non-zero-exitcode=abort'
     610
     611  ; Add the shared folders network provider
     612  ${LogVerbose} "Adding network provider (Order = $g_iSfOrder) ..."
     613  ${CmdExecute} "$\"$INSTDIR\Tools\VBoxGuestInstallHelper.exe$\" netprovider add VBoxSF $g_iSfOrder" 'non-zero-exitcode=abort'
     614
     615skip_sf:
    609616
    610617  ;
Note: See TracChangeset for help on using the changeset viewer.

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