Upgrading/Installing the VMware tools or uninstallation of VMware Tools sometimes fails with the following errors

  • The feature you are trying to use is on a network resource that is unavailable.  Click OK to try again, or enter an alternate path to a folder containing the installation package “VMware Tools64.msi
  • VGAuthservice and Alias Manager cannot be installed
  • A network error occurred while attempting to read from the file C:\Windows\Installer\VMware Tools.msi



This is an issue with Microsoft Windows Installer. The problem can occur when the original install path from the older version of VMware Tools is invalid.

Source: https://knowledge.broadcom.com/external/article/315629/clean-uninstallation-of-vmware-tools-in.html


Before processing the following steps to manually deinstall the VMware Tools, you can also first try to use the msiexec.exe tool therefore as shown in general in my following post.



Note: Take a backup of the virtual machine before proceeding with the further steps. 

Before deleting the files below, first stop all VMware related service and disable them.


  1. Manually delete VMware Tools installation files under these locations. Note: Select the appropriate user and username in the machine in the path.
    • C:\Program Files\VMware
    • C:\Program Files\Common Files\VMware
    • C:\Program Data\VMware
    • C:\users\username\App data\VMware


Note that all of these files, drivers and registry entries will even not be removed when you perform a successful uninstallation by using Microsoft Windows Installer by default.


Start Regedit > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\

Delete all VMware related drivers including vmci, vm3dmp, vmaudio, vmhgfs, vmmemctl, vmmouse, VMRawDisk, VMTools, vmusbmouse, vmvss, vmware physical disk helper services, VMwareCAF*.


Delete the same driver under C:\Windows\System32\Drivers\.


When you encounter the following access denied message, we first need to take over ownership for the file.


Select the user to take ownership over you are logged in, nevertheless you need to select and use a user with administrator privileges.


Edit the permissions of Users to full control.


From now on you should be able to delete the driver file. In case some are in use you first need to reboot the computer.


Delete VMware.Inc from Regedit > HKEY_LOCAL_MACHINE\SOFTWARE\VMware.Inc


Remove the VMware SVGA driver from Device Manager if not already removed.


Next we need to check if all VMware services are removed from Windows services. The screenshot below shows all services before the step above.

Get-Service -DisplayName “VMware*”
Get-Service -DisplayName “GISvc”

The GIsvc service is not running on my system below. The GISvc (Guest Integration Service) is used by VMware AppDefense.

The AppDefense components consists of glxgi.sysgiappdef.sys kernel mode drivers and gisvc.exe user mode service.
Source: https://docs.vmware.com/en/VMware-Tools/11.1.0/com.vmware.vsphere.vmwaretools.doc/GUID-E45C572D-6448-410F-BFA2-F729F2CDA8AC.html

VMware AppDefense has been deprecated as a standalone product. VMware announced the transition of AppDefense capabilities into VMware Carbon Black Workload to unify and enhance workload protection. This transition is part of VMware’s broader strategy to integrate security solutions into a single, comprehensive platform.


In my case the VMware Alias Manager and Ticket Service is still shown under Windows services.


We can delete the service also by executing the following command within the CMD.

> sc delete <service_name>

SC is a command line program used for communicating with the Service Control Manager and services.

Sc delete
Deletes a service subkey from the registry. If the service is running or if another process has an open handle to the service, the service is marked for deletion.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc742045(v=ws.11)


Finally the sc delete command just deletes a service subkey under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ as we previously also used.



So previously I missed to delete this subkey in the registry.



We also want to remove the VMware Tools from showing up under Control Panel > All Control Panel Items > Programs and Features as shown below.


Therefore we first need to determine the GUID (IdentifyingNumber) of the VMware Tools as shown below.

Open PowerShell and execute the following cmdlet.

> Get-WmiObject Win32_Product -Filter "Name LIKE '%VMware%'"


Now we need to search for this number within the registry under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and finally delete the corresponding key.


When we now refresh the Programs and Features window by pressing F5, the VMware Tools also here were removed.


Links

Clean uninstallation of VMware Tools in Windows Guest OS
https://knowledge.broadcom.com/external/article/315629/clean-uninstallation-of-vmware-tools-in.html

What is VMware AppDefense?
https://4sysops.com/archives/what-is-vmware-appdefense/

Integration of VMware AppDefense with VMware Tools
https://docs.vmware.com/en/VMware-Tools/11.2.0/com.vmware.vsphere.vmwaretools.doc/GUID-A524F803-C6D3-464B-91B2-3640D3C0841F.html