Configure BES Relay to Use Drive with Largest Free Disk Space - Version >= 6.0
Log In or Register to download the BES file, and more.

0 Votes

Description

One or more of your BES Relays is currently installed on a drive that has less free disk space than another drive on the same computer. You can configure the BES Relay to use the drive with more disk space through this Fixlet message.

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

ID585
TitleConfigure BES Relay to Use Drive with Largest Free Disk Space - Version >= 6.0
CategoryOptional
Download Size0
SourceBigFix
Source ID<Unspecified>
Source Severity<Unspecified>
KeywordsBES Relay drive Note DOS
Added by on 10/17/2012 1:16:18 PM
Last Modified by on 10/17/2012 1:16:18 PM
Counters 4700 Views / 2 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 30 fixlets   * Results in a true/false
Show indented relevance
NOT exists main gather service
Used in 85 fixlets and 10 analyses   * Results in a true/false
Show indented relevance
exists relay service OR exists main gather service
Used in 92 fixlets and 24 analyses   * Results in a true/false
Show indented relevance
version of client >= "5.1"
Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists setting "ChangeRelayCacheDrive" whose (value of it as lowercase = "yes") of client
Used in 1 fixlet   * Results in a true/false
Show indented relevance
(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:
Share this page on Yammer

Comments

Log In or Register to leave comments!