Horizon Agent Client and Agent Silent msi /x guid uninstall

by | Jan 26, 2023 | VMware Horizon View

Overview

In many cases, people use the .msi/.exe format and third-party deployment tools to manage software installation, updates, and in some cases, uninstallation. In this article, we will be discussing the Horizon Client and Horizon Agent. These concepts can also be applied to other .msi/.exe file types. The Horizon Client and Agent use these file types for installation and modification. This article can serve as a guide for your deployment, upgrades, modifications, or removal of the software.

The .exe file acts as a wrapper that contains the MSI files and runs them in the correct order during the installation process. For example, a software product may have multiple components, each with their own MSI file. The software vendor may choose to bundle these MSI files into a single .exe file to make the installation process easier for the end user.

It is always important to follow official documentation for procedures below and it may be best to utilize the switches with the .exe to better cleanup the install if you are trying to uninstall it completely. For instance in some cases you may find yourself looking for the codes for the MSI but find that you may have missed some of the other msi files that the exe installed. For example with the Horizon Client uninstall I would try this first then work with the MSI code.

VMware-Horizon-Client-y.y.yxxxxxx.exe /uninstall

Here is an example of the agent 2212.

msiexec.exe /qb /x {53D6EE37-6B10-4963-81B1-8E2972A1DA4D}

Documentation source:

Uninstall Horizon Client for Windows

Uninstalling VMware Horizon 8 Components Silently by Using MSI Command-Line Options

 

How to:

First you must look at what is installed on your machine. We can use Windows Powershell for that. Start by entering this into your Powershell window. Once you run this command you can see the output below shows us the ID we need.

Agent:

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, ModifyPath |
Where-Object {$_.DisplayName -eq ‘VMware Horizon Agent’} | Format-Table –AutoSize

Client:

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, ModifyPath |
Where-Object {$_.DisplayName -eq ‘VMware Horizon Client’} | Format-Table –AutoSize

Once you have your unique information on that msi you will then be able use the command line to uninstall it or use my script for additional cleanup. I will say that if you are going to use my script this is something that I wrote and is not something officially supported. Use at your own risk.

Simple command line to uninstall 2212 client example:

MsiExec.exe /X {A37284DF-37C2-40D8-B857-E1DB2BA6892B}

Script with logging and directly cleanup:

@echo off

rem Uninstall Horizon Client
msiexec /x {A37284DF-37C2-40D8-B857-E1DB2BA6892B} /q /l*v “C:\temp\HorizonClientUninstall.log”

rem Remove related files and directories
rmdir /s /q “C:\ProgramData\VMware\VMware Horizon View”
rmdir /s /q “C:\Program Files\VMware\VMware Horizon View Client”
rmdir /s /q “C:\Program Files (x86)\VMware\VMware Horizon View Client”

echo Horizon Client has been successfully uninstalled and related files and directories have been removed.
echo Log file with detailed information can be found at “C:\temp\HorizonClientUninstall.log”