Uninstall Bomgar Jump client

Greetings all -

I’m looking to uninstall older versions of the Bomgar Jump client from endpoints.

The relevance for finding the devices that have the older versions is working well, which looks like this:

exists keys 
  whose
  (
      value "DisplayName" of it as string starts with "Bomgar Jump Client" 
    AND
      (
          value "Publisher" of it as string as lowercase contains "bomgar" 
        AND
          value "DisplayVersion" of it as string < "18.1.4"
      )
  )
  of keys "hklm\software\microsoft\windows\currentversion\uninstall" of 
  (
      native registry;registry
  )

The code that I’m trying to use to find the uninstall strings and build up an Appendfile with the potentially many (depending on number of older versions found) currently looks like this:

// code below looks for the uninstall strings, builds a file that contains the commands and strings needed to perform the uninstalls
appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & value "UninstallString" of it & " --silent" ) of keys whose (value "DisplayName" of it starts with "Bomgar Jump Client" AND (value "Publisher" of it as contains "Bomgar") AND value "DisplayVersion" of it as string < "18.1.4") of keys "hklm\software\microsoft\windows\currentversion\uninstall" of (native registry;registry)}

… except that code is failing entirely. I want it to find the Uninstall string and place it in the appendfile which will then be copied to a batch file that gets run on the device, effectively removing all of the old versions.

Suggestions on what is broken?

It would be really useful to run this in the Fixlet Debugger to get a useful error message. I did make one small change that I think will be required, in casting the registry uninstall value “as string”, but I’m not sure whether there are other problems there.

Thanks @JasonWalker -

I think this is closer to what I was looking for (and there was some more broken language back in the original)

appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & 
"{value "UninstallString"of keys whose 
    ((value "DisplayName" of it starts with "Bomgar Jump Client") AND
     (value "Publisher" of it starts with "Bomgar") AND
     (value "DisplayVersion" of it as string < "18.1.4")) of 
    keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of
    (native registry;registry) &
  "--silent"}

Still no go with that, and working through the QNA tool, not getting results either.

I tried just:

{(value "UninstallString" of keys whose (value "DisplayName" of it starts with "Bomgar Jump Client")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}
that complains of illegal character in the command/query

and removed the curly braces in the QNA tool as well. no go.

in QNA:
q: value "UninstallString" of keys whose (value "DisplayName" of it starts with "Bomgar Jump Client") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)

E: the operator starts with is not defined

Ok, pretty much the same problem. A “registry key value type” is not directly a string, it’s actually a complex type, and you have to cast it ‘as string’ before doing things like ‘starts with’. Try

q: value "UninstallString" of keys whose (value "DisplayName" of it as string starts with "Bomgar Jump Client") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry) as string

I got back results in QNA, but… still not getting anywhere with the Action script snippet here:

    // code below looks for the uninstall strings, builds a file that contains the commands and strings needed to perform the uninstalls
    appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & "(value "UninstallString" of it as string & "--silent") of keys whose ((value "DisplayName" of it as string starts with "Bomgar Jump Client") AND (value "Publisher" of it as string starts with "Bomgar") AND (value "DisplayVersion" of it as string < "18.1.4")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}

Cleaned up a little more (had a stray " in there) Checking again…

// code below looks for the uninstall strings, builds a file that contains the commands and strings needed to perform the uninstalls
appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & (value "UninstallString" of it as string & "--silent") of keys whose ((value "DisplayName" of it as string starts with "Bomgar Jump Client") AND (value "Publisher" of it as string starts with "Bomgar") AND (value "DisplayVersion" of it as string < "18.1.4")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}

I think you should also check for the uninstall string existence in your whose. And had an unmatched parenthesis.

TRY:

appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & (value "UninstallString" of it as string & "--silent")) of keys whose (exists value "UninstallString" of it AND (value "DisplayName" of it as string starts with "Bomgar Jump Client") AND (value "Publisher" of it as string starts with "Bomgar") AND (value "DisplayVersion" of it as string < "18.1.4")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}

Thanks very much, I think you found the missing paren that was my stumbling block.

Got one more issue that I think I can fix with it - I need to make sure that the Uninstall string contains the expected command (there may be multiple versions of the uninstall, one of which would be msi based, one that is a different exe that requires a different switch to silence it).

It’ll get a little more complex, but at least I’m in the right ballpark now.

Thanks to you and Jason both for the assistance!

For anyone else that may benefit from this… here’s the action script that I wound up with, along with the relevance that I’m using to figure out what devices to try to run against:

Action script:

// modify the version number in the appendfile line below to affect all versions of Bomgar Jump except that version

// cleanup first, start with clean appendfile
delete __appendfile

// code below looks for the uninstall strings, builds a file that contains the commands and strings needed to perform the uninstalls
//
// next line gets strings for bomgar-scc uninstaller
appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & (value "UninstallString" of it as string & " --silent")) of keys whose (exists value "UninstallString" of it AND (value "DisplayName" of it as string starts with "Bomgar Jump Client") AND (value "Publisher" of it as string starts with "Bomgar") AND (value "DisplayVersion" of it as string < "18.1.4") AND (value "UninstallString" of it as string contains "bomgar-scc")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}
// next line gets strings for msiexec uninstaller
appendfile {concatenation "%0d%0a" of ("start /wait %22Bomgar Uninstall%22 " & (value "UninstallString" of it as string & " /quiet")) of keys whose (exists value "UninstallString" of it AND (value "DisplayName" of it as string starts with "Bomgar Jump Client") AND (value "Publisher" of it as string starts with "Bomgar") AND (value "DisplayVersion" of it as string < "18.1.4") AND (value "UninstallString" of it as string contains "msiexec")) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (native registry;registry)}

// delete any existing BomgarJumpUninstall.bat
delete c:\windows\temp\BomgarJumpUninstall.bat

// copy the appendfile that was created over to the BomgarJumpUninstall.bat
copy __appendfile c:\windows\temp\BomgarJumpUninstall.bat

// delete any existing BomgarJumpUninstall.bat
delete \\fileserv-name\logs\{Computer name}_BomgarJumpUninstall.bat

// copy the BomgarJumpUninstall.bat file to the fileserv-name server logs folder
copy __appendfile \\fileserv-name\logs\{Computer name}_BomgarJumpUninstall.bat

// run the batch file to do the cleanup and removal of old Bomgar Jump versions (or all Bomgar Jump versions in our case)
waithidden cmd /C c:\windows\temp\BomgarJumpUninstall.bat

Relevance (besides the relevance that looks for Windows of Operating system, and relevance that looks for expected computer names)

exists keys whose (value "DisplayName" of it as string starts with "Bomgar Jump Client" AND
       (value "Publisher" of it as string as lowercase contains "bomgar" AND
	    value "DisplayVersion" of it as string < "18.1.4"))
    of 
	   keys "hklm\software\microsoft\windows\currentversion\uninstall" of (native registry;registry)

I would have to note that I’m seeing systems still showing up as relevant even after confirming that the script is completing it’s run, and that has me a little confused as the removal that is being run should have gotten rid of things, but i suppose it is possible that not rebooting the devices has left the remnants behind to be found and possibly discovered when it comes to determining relevance again.

Sadly this was all necessary because Bomgar, in older versions, wasn’t good about cleaning up old versions behind itself. Newer versions are supposed to be better in that area.

2 Likes

Congratulations! Always happy to see someone successful at fixlet authoring. I’m looking forward to seeing more from you in the future!

This works for me manually 100% with a prompt to asking for yes or no to uninstall. How can I avoid that?
Because of that prompt it’s not working with bigfix?

You’ll need to find & use Bomgar’s command line options for silent uninstall.

This is the .bat file which actionscript generates and I think the silent command is already in there

start /wait "Bomgar Uninstall" C:\ProgramData\bomgar-scc-0x5e3b29fb\bomgar-scc.exe -pinned win32uninstall /no-spinner --silent

but when I run it manually with admin credentials it brings up a pop up asking to confirm.

You may need to google it or contact Bomgar support then. You’ll need to find a silent uninstall regardless of what tool you use to deploy the command (BigFix, SCCM, powershell, scheduled tasks, psexec…would all hang on that)

Bomgar provided me their uninstaller application, it’s called unbomgar.exe and it works great. Using it with bigfix to uninstall all old versions.

1 Like

unbomgar.exe is a wonderful blunt instrument tool. Pity it’s needed as often as it is.

Got it!

bomgar-scc.exe -uninstall silent