TROUBLESHOOTING: Uninstall BES Client
0 Votes |
Description
If you want to remove the BES Clients from a computer, you can remove it using this task in two ways:
Note: The action to remove the BES Client will not delete the folder "C:\Program Files\BigFix Enterprise". Note: If you use the second option to remove BES Client, "BES Client" folder and its subfolder "__BESData\BES Support" may still exist after running the fixlet. Note: This task will not report relevant on the BES Server and BES Relays. To remove the BES Client on a BES Relay, you must first uninstall the BES Relay using the appropriate BES Relay uninstall task. Important Note: The BES Clients will not be able to report the final status of the action because they will be removed before the action completes. Instead, the BES Clients will stop responding and the action status will report back as 'Evaluating', 'Failed', or 'Running'. You will need to manually remove the computer from the BES Console after the BES Client is uninstalled. Important Note: This task will not become relevant on machines on which the BES Client has been hidden from the Add/Remove Programs List. Please use the tasks prior to using this removal task. |
Property Details
533 | |
TROUBLESHOOTING: Uninstall BES Client | |
Troubleshooting | |
0 | |
BigFix | |
<Unspecified> | |
Low | |
5/12/2003 12:00:00 AM | |
BES Client Clients Remove Note | |
besSupport on 10/17/2012 1:16:06 PM | |
danielheth on 10/17/2012 1:16:06 PM | |
21823 Views / 138 Downloads | |
* Average over 0 ratings. ** Log In or Register to add your rating. |
Relevance
Used in 221 fixlets | * Results in a true/false |
Used in 1 fixlet | * Session Relevance |
Actions
Action 1
if {name of operating system starts with "Win"}
// create a batch file to create the temp folder
delete __appendfile
delete tempdir.bat
appendfile @echo off
appendfile {if (exists variable "temp" of environment) then ("") else if (exists folder "temp" of windows folder) then ("") else ("mkdir " & pathname of windows folder as string & "\temp")}
move __appendfile tempdir.bat
wait "{pathname of client folder of site "BESSupport" & "\RunQuiet.exe"}" tempdir.bat
delete tempdir.bat
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}"
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")}"
copy "{pathname of client folder of site "BESSupport" & "\RunQuiet.exe"}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}"
copy "{pathname of client folder of site "BESSupport" & "\delClient.iss"}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")}"
// create a batch file to uninstall client and run BESRemove from a different directory
appendfile @echo off
appendfile cd {if (exists variable "temp" of environment) then (value of variable "temp" of environment as string) else (pathname of folder "temp" of windows folder as string)}
appendfile {(if it as lowercase starts with "msiexec" then preceding text of first "%00" of it else preceding text of first "%20-" of it) of (value "UninstallString" of key whose ((it = "BigFix Enterprise Client" OR it = "BigFix for IBM Proventia ESC Client" OR it = "ESP Agent" OR it = "Trend Micro Endpoint Security Platform" OR it = "Tivoli Endpoint Manager Client") of (value "DisplayName" of it as string)) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" of registry as string)}{if (value "UninstallString" of key whose ((it = "BigFix Enterprise Client" OR it = "BigFix for IBM Proventia ESC Client" OR it = "ESP Agent" OR it = "Trend Micro Endpoint Security Platform" OR it = "Tivoli Endpoint Manager Client") of (value "DisplayName" of it as string)) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" of registry as string as lowercase starts with "msiexec") then " /qn" else (" -s --uninstallsilent " & (if version of regapp "BESClient.exe" >= "5.1" then " -f1" & (if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")) else ""))}
// move batch file to temp directory
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
copy "__appendfile" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
// run batchfile
run "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
else
continue if {false}
endif
This action will be considered successful when the applicability relevance evaluates to false.
Action 2
if {version of client <= "7.2"}
download http://software.bigfix.com/download/bes/72/BESRemove-7.2.4.60.exe
continue if {(size of it = 961608 and sha1 of it = "d366dddd7cb7af637b5c0fe38b645c60e0181a9d") of file "BESRemove-7.2.4.60.exe" of folder "__download"}
delete "__download/BESRemove.exe"
move "__download/BESRemove-7.2.4.60.exe" "__download/BESRemove.exe"
else
download http://software.bigfix.com/download/bes/81/BESRemove-8.1.608.0.exe
continue if {(size of it = 1101720 and sha1 of it = "c116b6aa0c58f9cae40405dae65eaabe08af97d3") of file "BESRemove-8.1.608.0.exe" of folder "__download"}
delete "__download/BESRemove.exe"
move "__download/BESRemove-8.1.608.0.exe" "__download/BESRemove.exe"
endif
// create a batch file to create the temp folder
delete __appendfile
delete tempdir.bat
appendfile @echo off
appendfile {if (exists variable "temp" of environment) then ("") else if (exists folder "temp" of windows folder) then ("") else ("mkdir " & pathname of windows folder as string & "\temp")}
move __appendfile tempdir.bat
wait "{pathname of client folder of site "BESSupport" & "\RunQuiet.exe"}" tempdir.bat
delete tempdir.bat
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\BESRemove.exe") else (pathname of folder "temp" of windows folder as string & "\BESRemove.exe")}"
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}"
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")}"
move "__download/BESRemove.exe" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\BESRemove.exe") else (pathname of folder "temp" of windows folder as string & "\BESRemove.exe")}"
copy "{pathname of client folder of site "BESSupport" & "\RunQuiet.exe"}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}"
copy "{pathname of client folder of site "BESSupport" & "\delClient.iss"}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")}"
// create a batch file to uninstall client and run BESRemove from a different directory
appendfile @echo off
appendfile cd {if (exists variable "temp" of environment) then (value of variable "temp" of environment as string) else (pathname of folder "temp" of windows folder as string)}
appendfile {(if it ends with "%00" then preceding text of first "%00" of it else it) of (value "UninstallString" of key whose ((it = "BigFix Enterprise Client" OR it = "BigFix for IBM Proventia ESC Client" OR it = "ESP Agent" OR it = "Trend Micro Endpoint Security Platform" OR it = "Tivoli Endpoint Manager Client") of (value "DisplayName" of it as string)) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" of registry as string)} {if (value "UninstallString" of key whose ((it = "BigFix Enterprise Client" OR it = "BigFix for IBM Proventia ESC Client" OR it = "ESP Agent" OR it = "Trend Micro Endpoint Security Platform" OR it = "Tivoli Endpoint Manager Client") of (value "DisplayName" of it as string)) of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" of registry as string as lowercase starts with "msiexec") then "/qn" else ("/s --uninstallsilent " & (if version of regapp "BESClient.exe" < "5.1" then " /f1 %22" & (if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\delClient.iss") else (pathname of folder "temp" of windows folder as string & "\delClient.iss")) & "%22" else ""))}
appendfile RunQuiet.exe BESRemove.exe /silent /force /client
appendfile rmdir /s /q {pathname of parent folder of regapp "BESClient.exe"} > NUL 2> NUL
// move batch file to temp directory
delete "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
copy "__appendfile" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
// run batchfile
run "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunQuiet.exe") else (pathname of folder "temp" of windows folder as string & "\RunQuiet.exe")}" "{if (exists variable "temp" of environment) then (value of variable "temp" of environment as string & "\RunBESRemove.bat") else (pathname of folder "temp" of windows folder as string & "\RunBESRemove.bat")}"
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
Social Media: |