(imported comment written by rad.ricka91)
Ben,
it’s interesting, I’m doing exactly what you’ve suggested, however the besclientsetup.exe fails to replace the
“ActionMasthead” and “GatherUrl” in HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\GlobalOptions, so the net result is that the client will register with the new server, realize that it doesn’t have the right url and masthead and fail.
I tired jacking the GatherUrl and the Masthead into the action, but I’ve clearly hit a a limit on the textual size of the action - the masthead is just too large and things start to break in places (like the editor windows, guess that’s down to the limit of the text box form control and then when running the action). So this approach didn’t work.
I’d be more interested in finding out why the GatherUrl and Masthead don’t get replaced in the registry when running the besclientsetup.exe command - I thought that would’ve done the trick.
R.
<–action script–>
action parameter query “Relay1” with description “Please enter the IP address for the first relay:”
action parameter query “Relay2” with description “Please enter the IP address for the second relay:”
download http://127.0.0.1:52311/masthead/masthead.afxm
copy “__Download\masthead.afxm” “masthead.afxm”
dos besclientsetup.exe masthead.afxm
regdelete "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\GlobalOptions
" “ReportSequenceNumber”
regdelete "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\GlobalOptions
" “RegCount”
regdelete "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\GlobalOptions
" “ComputerID”
regset "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client__Relay_Control_RootServer
" “value”=“http://{parameter “Relay1” of action}:52311/cgi-bin/bfgather.exe/actionsite”
regset "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client__RelayServer1
" “value”=“http://{parameter “Relay1” of action}:52311/cgi-bin/bfgather.exe/actionsite”
regset "
HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient\Settings\Client__RelayServer2
" “value”=“http://{parameter “Relay2” of action}:52311/cgi-bin/bfgather.exe/actionsite”
delete __appendfile
appendfile net stop besclient
appendfile rd “{pathname of parent folder of regapp “besclient.exe” & “__BESData”}” /Q /S
appendfile net start besclient
copy __appendfile C:\restart.bat
run C:\restart.bat
<–action script -->