So I’ve been trying to get Horizon direct connection working in my home lab. The goal is to remote into a home PC using the Horizon client(PCOIP/BLAST) via DDNS, PFSense and Horizon direct connection.
For the direct connection feature, one of the key requirements is to run the Horizon agent install silently using the command,
VMware-Horizon-Agent-x86_64-7.8.0-12599301 /v VDM_SKIP_BROKER_REGISTRATION=1
Little did I know I would spend an hour troubleshooting the agent install, which usually is a straight forward install. The agent install rolled back and to retry installation a computer reboot was required.
Installer logs are usually under the users temp folder, as below: `%temp%/vmmsi.log_2019XXXX_184154_Failed.log
There was an interesting error in the log:
Action 15:11:02: VM\_InstallWinNewLogoffHandler.
MSI (s) (F0:7C) [15:11:02:717]: Executing op:
CustomActionSchedule(Action=VM_InstallWinNewLogoffHandler,ActionType=3073,Source=BinaryData,Target=VMInstallNewLogoffHandler,)
MSI (s) (F0:24) [15:11:02:724]:
Invoking remote custom action. DLL: C:\\Windows\\Installer\\MSIEE13.tmp, Entrypoint: VMInstallNewLogoffHandler
VMInstallNewLogoffHandler: Entering VMInstallNewLogoffHandler in C:\\Windows\\Installer\\MSIEE13.tmp, version 0.0.0.0
VMInstallNewLogoffHandler: ERROR: failed to get LSASS Handle 5
VMInstallNewLogoffHandler: ERROR: Failed to get system token: 5
VMInstallNewLogoffHandler: End logging.
CustomAction VM_InstallWinNewLogoffHandler returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 15:11:02: InstallFinalize. Return value 3.
After some digging around, I found out that the issue was caused by Avast Antivirus. Disabling Avast did not help. I had to uninstall it completely and then the Agent install completed without any issues.
The reason why I started looking at Avast was; as per the error in the log, the installer was trying to communicate with lsass and failed. I thought something was blocking the installer, tried turning UAC off and made sure the installer was run as an administrator before looking at Avast.