# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
"""
{
"key": "{5D115B69-754F-435F-90CD-BF98883C75E4}",
"name": "VMware Horizon Client",
"version": "8.11.1.41306",
"install_date": "2024-01-23 00:00:00",
"install_location": "C:\\Program Files\\VMware\\VMware Horizon View Client\\",
"uninstall_string": "MsiExec.exe /X{5D115B69-754F-435F-90CD-BF98883C75E4}",
"publisher": "VMware, Inc.",
"system_component": 0,
"win64": true,
},
{
"key": "{BB909B3C-32EA-448A-8ABA-8CC5F18B2577}",
"name": "VMware Horizon Media Redirection for Microsoft Teams",
"version": "8.11.0",
"install_date": "2024-01-23 00:00:00",
"install_location": "",
"uninstall_string": "MsiExec.exe /X{BB909B3C-32EA-448A-8ABA-8CC5F18B2577}",
"publisher": "VMware, Inc.",
"system_component": 0,
"win64": true,
},
{
"key": "{C4F7D671-317A-4192-B725-6B1E7F647BC0}",
"name": "VMware Horizon HTML5 Multimedia Redirection Client",
"version": "8.11.0",
"install_date": "2024-01-23 00:00:00",
"install_location": "",
"uninstall_string": "MsiExec.exe /X{C4F7D671-317A-4192-B725-6B1E7F647BC0}",
"publisher": "VMware, Inc.",
"system_component": 0,
"win64": true,
},
{
"key": "{71565c0b-e471-4e74-86cf-9743f3cd03a0}",
"name": "VMware Horizon Client",
"version": "8.11.1.41306",
"install_date": "",
"install_location": "",
"uninstall_string": '"C:\\ProgramData\\Package Cache\\{71565c0b-e471-4e74-86cf-9743f3cd03a0}\\VMware-Horizon-Client-2309.1-8.11.1-22783278.exe" /uninstall',
"publisher": "VMware, Inc.",
"system_component": 0,
"win64": false,
},
https://silentinstallhq.com/vmware-horizon-client-silent-install-how-to-guide/
https://silentinstallhq.com/vmware-horizon-client-install-and-uninstall-powershell/
"""
# srvhorizon = "srvhorizon.ad.domain.lan"
srvhorizon = ""
if srvhorizon:
silentflags = f'/silent /norestart VDM_Server={srvhorizon}"'
else:
silentflags = "/silent /norestart"
def install():
bin_name = glob.glob("VMware-Horizon-Client*.exe")[0]
install_exe_if_needed(
bin_name,
silentflags=silentflags,
name="VMware Horizon Client",
min_version=control.get_software_version(),
)
# Adding QuietUninstallString
for a in installed_softwares(name="VMware Horizon Client"):
if "Package Cache" in a["uninstall_string"]:
app_uninstallkey = a["key"]
break
uninstallkey = [app_uninstallkey]
quiet_uninstall_string = (
installed_softwares(uninstallkey=app_uninstallkey)[0]["uninstall_string"]
+ r' /silent /norestart /log "%WINDIR%\Temp\VMWareHorizonClient-Uninstall.log"'
)
register_uninstall(app_uninstallkey, quiet_uninstall_string=quiet_uninstall_string)
def uninstall():
#other VMware applications can remain (HTML5 Multimedia Redirection Client,...)
for s in installed_softwares('VMware Horizon'):
run(uninstall_cmd(s['key']))