Uninstalling and Reinstalling BigFix client Via Fixlet

(imported topic written by macook91)

Hello,

I am trying to come up with a way to uninstall the bigfix client, run besremove, and install a new client using a fixlet. This is what i have come up with.

download http://afd-bfx-01/offers/BigFix/clientsettings.cfg

download http://afd-bfx-01/offers/BigFix/masthead.afxm

download http://afd-bfx-01/offers/BigFix/BESSetup.exe

download http://afd-bfx-01/offers/BigFix/BESRemove.exe

download http://afd-bfx-01/offers/BigFix/SwapOfflineBigFixClient.bat

dos mkdir “C:\BESTemp”

copy “__download\clientsettings.cfg” “C:\BESTemp”

copy “__download\masthead.afxm” “C:\BESTemp”

copy “__download\BESSetup.exe” “C:\BESTemp”

copy “__download\BESRemove.exe” “C:\BESTemp”

copy “__download\SwapOfflineBigFixClient.bat” “C:\BESTemp”

wait C:\BESTemp\SwapOfflineBigFixClient.bat

The batch file calls the appropriate uninstall, besremove, and install commands.

This all works just fine in my head, however its not actually copying the files from __download to my temporary folder. Is this because I need to use their sha1 value instead of a file name or what?

Thanks in advance,

Mike

(imported comment written by SystemAdmin)

Here’s the one I made. You have to use the software distribution wizard to package the BigFix installer MSI and also the BigFix remover tool. Any PCs that run this task though will appear as a totally new PC so you will have to run the BigFix Computer Remover tool to tidy up your database.

// Download and Extract Tools
download http://10.41.52.14:52311/Uploads/124a6288caac8fc1faba016015dd3ddcc42cece2/ClientMSI.tmp
continue if {(size of it = 11015953 AND sha1 of it = “124a6288caac8fc1faba016015dd3ddcc42cece2”) of file “ClientMSI.tmp” of folder “__Download”}
extract ClientMSI.tmp

// Tidy up if this process has run before.
delete __appendfile
folder delete c:\BigFixRemove

//Create Temporary folder for the process to run in
folder create c:\BigFixRemove

// Create Batch File
appendfile @echo off
appendfile c:\BigFixRemove\Besremove8 /silent /all
appendfile “{pathname of system folder & “\msiexec.exe”}” /i c:\BigFixRemove\besclient.msi /quiet /norestart

//Copy files to the appropriate location
move __appendfile c:\BigFixRemove\remove.cmd
waithidden cmd.exe /C copy /Y “__Download*." "c:\BigFixRemove.*”

// Run Batch file
waithidden c:\BigFixRemove\remove.cmd

(imported comment written by macook91)

In my testing, the MSI didnt work with a clientsettings.cfg which I need. Am I mistaken?

(imported comment written by SystemAdmin)

I don’t use a .cfg so I don’t know. You could probably put the .exe file in your package instead.