Uninstall win application using msiexec command

Hello, I am looking to have a fixlet created which will uninstall one software from Windows clients. The software uses the same GUID as mentioned below for all win servers:-

msiexec.exe /x {B7643B11-A60E-4A33-A465-263FEB32113A}

Please suggest how can we get the fixlet created.

It can be as simple as the following placed into a custom task:

wait msiexec.exe /x {{B7643B11-A60E-4A33-A465-263FEB32113A}

Notice the double curly braces to escape at the start of the GUID.

2 Likes

Thank you, will definitely try and get back.

Should I be trying the below as the one you mentioned is kept on running state from sometime : -

if {exists key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{B7643B11-A60E-4A33-A465-263FEB32113A}” of registry}
waithidden MsiExec.exe /x {{B7643B11-A60E-4A33-A465-263FEB32113A} /passive
endif

1 Like

So braces within braces are going to cause you issues. Maybe try something like this:

if {exists key whose (name of it contains “B7643B11-A60E-4A33-A465-263FEB32113A”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry}
waithidden MsiExec.exe /X {{B7643B11-A60E-4A33-A465-263FEB32113A} /passive
endif

Encountered error in logs:-
Command failed (Relevance substitution error.) if {exists key whose (name of it contains “B7643B11-A60E-4A33-A465-263FEB32113A”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry}

Even I tired action script with
waithidden msiexec.exe /i {B7643B11-A60E-4A33-A465-263FEB32113A } /quiet /norestart
but got an error
(Relevance substitution failed) waithidden msiexec.exe /i {B7643B11-A60E-4A33-A465-263FEB32113A } /quiet /norestart

/i -->install
/x -->uninstall

You need to escape the curly braces in your action. Notice the additional opening brace that does the escape.

waithidden msiexec.exe /x {{B7643B11-A60E-4A33-A465-263FEB32113A } /quiet /norestart

1 Like

Have you tried running the action in the Fixlet debugger on a test machine? If it works there, you know the action itself is likely not the problem.