Uninstall application

how to uninstall the application in bigfix which is nat a registered application?

Hi @haneesha

ActionScript can read dos commands too. If you have the .exe file, then maybe it’s possible to use .exe /uninstall.

(like with SCCM for example, I uninstall it with the ccmsetup.exe /uninstall)

tanq @steini44 for reply but it is not working.

Could give some more information please?

Do you have the .exe file?
Did you try it in a dos box first (to check if the /uninstall parameter is working)?
If so, what is your action script?
Could you post the clients log please?

You could use relevance to parse the uninstall string form the registry

unique values of (values "UninstallString" of keys whose (((it contains "endpoint manager client") of (value "DisplayName" of it as string as lowercase)) and (it contains "ibm") of (value "Publisher" of it as string as lowercase)) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (registry ; native registry) as string)

Then you could use that in a wait (or run) command, appending any command line switches appropriate your your needs

waithidden {unique values of (values "UninstallString" of keys whose (((it contains "endpoint manager client") of (value "DisplayName" of it as string as lowercase)) and (it contains "ibm") of (value "Publisher" of it as string as lowercase)) of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (registry ; native registry) as string)} /norestart
1 Like

Basically you need to figure out how to uninstall the application from the command line non-interactively or silently. Once you figure that out, then it can be replicated in a bigfix action.

The first question to answer isn’t how to do this with BigFix, it is how to do this through the command line. Only once you have that answer should you try to do it through BigFix.

1 Like

Action script:

run {value "UninstallString" of key whose (Value "DisplayName" of it as string as lowercase = "google chrome") of Keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of Registry}

the status is showing as “completed” but uninstallation is not done.

You can also use below action fixlet for removing any windows based applications from machine…

waithidden "C:\Program Files\<application name>\<uninstall exe name>" /VERYSILENT /NORESTART

OR run cmd /c "C:\Program Files\<application name>\<uninstall exe name>" /S

You can use relevant syntax in place of VERYSILENT /NORESTART as per the application behavior e.g. /S or /SLIENT

If it’s not get stored under program file or not able to find uninstall exe… then use can use below action script …

waithidden msiexec.exe /i{Uninstall String} /quiet /norestart

you can get this from registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Hope this will work for you…

The reason this didn’t work is that the uninstall string is usually not sufficient to silently uninstall the application. The uninstall string is what is invoked when you click remove in add/remove programs, which is usually interactive and requires user input.

Also, you should use wait instead of run in almost all cases, though in this case because you invoked an interactive program non-interactively, it would have caused bigfix to stall until it was closed or the computer was rebooted.

There are many different kinds of application installers and uninstallers. They have different commands used to actually cause them to uninstall silently. You have to figure out what the correct commands are through research and experimentation. Only once you have the correct commands working from the command line can you then use those commands in bigfix to actually uninstall the application.

There are a few applications out there that cannot be uninstalled silently, but that is rare.

It is rare that you can use the uninstall string directly, but often you use the uninstall string in the registry as a basis for the command that will actually uninstall the program silently. Usually you use the uninstall string with some extra commands to cause this to happen.

@NEGIA that is not true:

The command line parameters for silently installing or uninstalling an application can vary widely depending upon the application. I’ve only seen /SILENT or /VERYSILENT on particular Microsoft products, but of course these could be in others as well.

MSI-based installers can usually use “/qn” for “Quiet/No Interface”, along with “/i” for install or “/x” for uninstall. A very small number of MSI packages are authored in a way where silent install/uninstall doesn’t work properly.

InstallShield-based applications usually need to use “/s” for silent, along with “/v/qn” in order to pass the “/qn” parameter along to an embedded MSI package that InstalLShield usually uses.

InstallAnywhere packages use different parameters (which I don’t recall at the moment).
Symantec packages their antivirus with different parameters.

For MSI packages I usually start with “msiexec /i package.msi /qn ALLUSERS=1 REBOOT=ReallySuppress” and see how that works.

In general if you don’t know, the “unattend” search term helps in google. For instance “chrome install unattend”

1 Like

This is for InnoSetup installers: Inno Setup Help

See this page: ( a precursor to BigFix.Me ) Legacy Communities - IBM TechXchange Community

From the page:

Here are some helpful links to command line switches for different installer types:

Note: Generally the installer is also the uninstaller, so switches for one often work for the other.

3 Likes

Thanks for the details… the commands which I have mentioned above, are used for EXE…

The issue is there are many different kinds of EXE installers. The commands you provided only work for one kind of EXE installer, not all kinds of EXE installers. There are many EXE installers where those commands will not work.

Please share the steps how to create fixlet to remove sccm client

I read this with interest and as jgstew points out tested the command line that works perfectly to install and uninstall Java 8 however with bigfix is failing

Install
jre-8u221-windows-i586-iftw.exe /s INSTALL_SILENT=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable REBOOT=Disable REMOVEOUTOFDATEJRES=0

Logs have error code -1 for installation
Command: “jre-8u221-windows-i586-iftw.exe” /s INSTALL_SILENT=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable REBOOT=Disable REMOVEOUTOFDATEJRES=0
Return code: -1

Uninstall
waithidden “MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180221F0}” /qn

Probably something simple that I am not catching

The uninstall is an easy mistake - the open curly brace is interpreted as the start of a Relevance substitution. You have to escape the symbol by using two cuely brackets as in

waithidden “MsiExec.exe /X{{26A24AE4-039D-4CA4-87B4-2F32180221F0}”

As for the installer, I’m afraid the JRE installers are frankly just a mess, based on MSI CustomActions that Oracle authored into them and directories it expects to find under the user’s AppData folder, that don’t exist for the System account in 32-bit mode. Have a look at the JRE installers in the “Updates for Windows Applications” site for examples of the symlinks that need to be created under the System profile before running the JRE installation.

1 Like

@Toros72, Here is an example of a successful Java install.

parameter “tmpdir”=“C:\installers\java17u211x86”

//make sure target directory exists
dos rmdir /S /Q "{parameter “tmpdir”}"
dos md "{parameter “tmpdir”}"
dos rd /s /q c:\app\java
dos rd /s /q c:\app\jre
dos md c:\app\Java\JRE
copy __Download\jdk-7u211-windows-i586.exe “{parameter “tmpdir”}\jdk-7u211-windows-i586.exe”

wait “{parameter “tmpdir”}\jdk-7u211-windows-i586.exe” /s ADDLOCAL=“ToolsFeature,SourceFeature,PublicjreFeature” /INSTALLDIR=C:\App\Java /INSTALLDIRPUBJRE=C:\App\Java\JRE /L {parameter “tmpdir”}\install.log

//Set JAVA_HOME machine environment variable
wait cmd /c setx -m JAVA_HOME "C:\App\Java"
wait cmd /c setx -m PATH “c:\app\java;c:\app\java\jre;c:\app\java\jre\bin;c:\app\JPOS;%PATH%”

continue if {exists file “C:\installers\java17u211x86\install.log” whose (content of it contains “Installation operation completed successfully”)}

1 Like

Thanks I shall give it a go !