Configure BES Relay to Use Drive with Largest Free Disk Space - Version >= 6.0
0 Votes |
Description
Note: Several DOS windows will appear while the BES Relay is configured. These DOS windows may remain in place for a short period of time while all the files in the relay cache are moved to their new location.
Note: To see which drive the BES Client has determined is the drive with the largest free disk space, please create a new retrieved property with the following relevance clause:
name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))
Note: Only the "wwwroot" BES Relay data folder will be moved, the BES Relay executable and other program files will remain at its current location.
Property Details
585 | |
Configure BES Relay to Use Drive with Largest Free Disk Space - Version >= 6.0 | |
Optional | |
0 | |
BigFix | |
<Unspecified> | |
<Unspecified> | |
BES Relay drive Note DOS | |
besSupport on 10/17/2012 1:16:18 PM | |
danielheth on 10/17/2012 1:16:18 PM | |
4700 Views / 2 Downloads | |
![]() ![]() ![]() ![]() ![]() |
Relevance

exists relay service OR exists main gather service

version of client >= "5.1"
Used in 1 fixlet | * Results in a true/false |

exists setting "ChangeRelayCacheDrive" whose (value of it as lowercase = "yes") of client
Used in 1 fixlet | * Results in a true/false |

(free space of drive (first 2 of (value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of x32 registry as string)) + (sum of (sizes of files of folders of folder ((if(value of setting "_BESRelay_HTTPServer_ServerRootPath" of client) ends with "\" then ((value of setting "_BESRelay_HTTPServer_ServerRootPath" of client) & "bfmirror\downloads") else ((value of setting "_BESRelay_HTTPServer_ServerRootPath" of client) & "\bfmirror\downloads")))))) <free space of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))
Actions
Action 1
Action Link Click
here to configure the BES Relay to use the drive with the largest free disk space. (Use the default location 'drive:\wwwroot')
Script Type
BigFix Action Script
dos net stop BESRelay
dos del "{value "ConfigLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry as string & "\*.bfg"}"
if {exists relay service AND ((it >= "8.0") of (if (version of client >= "8.0") then (version of relay service) else (version of regapp "besrelay.exe")))}
dos xcopy /E /Y /I /Q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}\wwwrootbes"
dos rmdir /s /q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath]" "value"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & "\wwwrootbes\")}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server]" "wwwRootFolder"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & "\wwwrootbes\")}"
else
dos xcopy /E /Y /I /Q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}\wwwroot"
dos xcopy /E /Y /I /Q "{value "ContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}\wwwroot\bfmirror\bfsites"
dos xcopy /E /Y /I /Q "{value of setting "_BESRelay_HTTPServer_ServerRootPath" of client & "\bfmirror\downloads"}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}\wwwroot\bfmirror\downloads"
dos rmdir /s /q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}"
dos rmdir /s /q "{value "ContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}"
dos rmdir /s /q "{value of setting "_BESRelay_HTTPServer_ServerRootPath" of client & "\bfmirror\downloads"}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath]" "value"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & "\wwwroot")}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService]" "ContentLocation"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & "\wwwroot\bfmirror\bfsites")}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService]" "DownloadContentLocation"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & "\wwwroot\bfmirror\downloads")}"
endif
dos net start BESRelay
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 2
Action Link Click
here to configure the BES Relay to use the drive with the largest free disk space. (Specify a custom location for the Relay files)
Script Type
BigFix Action Script
action parameter query "RelayLocation" with description "Enter the path without trailing backslashes or spaces to the new Relay location on the drive with the largest free disk space." with default "\Program Files\BigFix Enterprise\BES Relay\wwwroot"
dos net stop BESRelay
dos del "{value "ConfigLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry as string & "\*.bfg"}"
if {exists relay service AND ((it >= "8.0") of (if (version of client >= "8.0") then (version of relay service) else (version of regapp "besrelay.exe")))}
dos xcopy /E /Y /I /Q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}{parameter "RelayLocation" of action}"
dos rmdir /s /q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath]" "value"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & (parameter "RelayLocation" of action) & "\")}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server]" "wwwRootFolder"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & (parameter "RelayLocation" of action) & "\")}"
else
dos xcopy /E /Y /I /Q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}{parameter "RelayLocation" of action}"
dos xcopy /E /Y /I /Q "{value "ContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}{parameter "RelayLocation" of action}\bfmirror\bfsites"
dos xcopy /E /Y /I /Q "{value "DownloadContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}\*.*" "{name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED")))}{parameter "RelayLocation" of action}\bfmirror\downloads"
dos rmdir /s /q "{value "value" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath" of registry}"
dos rmdir /s /q "{value "ContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}"
dos rmdir /s /q "{value "DownloadContentLocation" of key "HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService" of registry}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client\_BESRelay_HTTPServer_ServerRootPath]" "value"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & (parameter "RelayLocation" of action))}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService]" "ContentLocation"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & (parameter "RelayLocation" of action) & "\bfmirror\bfsites")}"
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\Enterprise Server\GatherService]" "DownloadContentLocation"="{escapes of (name of drive whose (type of it = "DRIVE_FIXED" AND free space of it = maximum of (free spaces of drives whose (type of it = "DRIVE_FIXED"))) & (parameter "RelayLocation" of action) & "\bfmirror\downloads")}"
endif
dos net start BESRelay
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
Social Media: |