Uninstall BES Console
Log In or Register to download the BES file, and more.

0 Votes

Description

Remove the BES Console from the endpoints that are no longer required to run

Property Details

ID27006
StatusBeta - Preliminary testing ready for more
TitleUninstall BES Console
DomainSYST
SourceInternal
Source Release Date5/29/2023 12:00:00 AM
KeywordsBigFix Console Uninstaller
Added by on 7/25/2023 6:44:00 AM
Last Modified by on 7/25/2023 6:44:00 AM
Counters 737 Views / 4 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 20 fixlets and 3 analyses   * Results in a true/false
Show indented relevance
exists regapp "BESConsole.exe"
isWindows (Relevance 1172)
Used in 1152 fixlets and 538 analyses   * Results in a true/false
Show indented relevance
windows of operating system

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
// Enter your action script here
if {name of operating system starts with "Win"}
    prefetch BESRemove.exe sha1:f47115b06d5e8bc77693273a94edc43b03d785ce size:4721200 http://software.bigfix.com/download/bes/100/util/BESRemove10.0.6.84.exe sha256:7d5f41fb3f23ddeca0eef8133ffa9e7efd9e30959c240519c283dc6e7ad119a1

parameter "tempDirPath" = "{if (name of drive of regapp "BESConsole.exe" = "C:") then (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)) else (name of drive of regapp "BESConsole.exe" as string & "\tempBESRemove")}"

delete __appendfile
delete tempdir.bat

appendfile @echo off
appendfile {if (name of drive of regapp "BESConsole.exe" = "C:") then (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"))) else (if (exists folder (name of drive of regapp "BESConsole.exe" as string & "\tempBESRemove")) then ("") else ("mkdir " & name of drive of regapp "BESConsole.exe" as string & "\tempBESRemove"))}

move __appendfile tempdir.bat
waithidden tempdir.bat

delete tempdir.bat
delete "{parameter "tempDirPath" & "\BESRemove.exe"}"

move __Download\BESRemove.exe "{parameter "tempDirPath" & "\BESRemove.exe"}"

// create a batch file to run BESRemove from a different directory and then uninstall console
appendfile @echo off
appendfile cd /D "{parameter "tempDirPath"}"
appendfile start BESRemove.exe /silent /force /console

if {exists (folder (name of drive of regapp "BESConsole.exe" as string & "\tempBESRemove"))}
    appendfile cd ..
    appendfile start rmdir /Q /S "{parameter "tempDirPath"}" > NUL 2> NUL
endif

// move batch file to temp directory
delete "{parameter "tempDirPath" & "\RunBESRemove.bat"}"
copy "__appendfile" "{parameter "tempDirPath" & "\RunBESRemove.bat"}"

// run batch file
waithidden "{parameter "tempDirPath" & "\RunBESRemove.bat"}"

// Remove the BESRemove.exe and RunBESRemove.bat
delete "{parameter "tempDirPath" & "\BESRemove.exe"}"
delete "{parameter "tempDirPath" & "\RunBESRemove.bat"}"
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!