...
The desktop appears as available in the View Administrator console even though the user has a disconnected session to this desktop.Single Sign-On (SSO) is not operating properly.You have just installed a new piece of software.You have implemented a new Group Policy Object (GPO).You have manually edited the userinit string in the registry in one of your virtual desktops.You see error in Event Viewer of the virtual desktop similar to: AGENT_PENDING_EXPIRED The pending session on machine for user has expired
This article provides a reference to the normal behavior of a userinit string in the Windows registry of a virtual desktop, and steps to fix a corrupted userinit string.
3rd party Software can hijack or replace the entries in the userinit string.
The userinit string is responsible for listing applications that are launched upon successful authentication to a Windows guest operating system. Sometimes the installation of new applications, application of new GPOs, and manual user edits leave the userinit string in a mode, which can adversely affect the successful operation of logins, Single Sign-On, and other parts of the environment.In a VMware Horizon View virtual desktop, the userinit string will be similar to: C:\Windows\System32\userinit.exe,"C:\Program Files\VMware\VMware View\Agent\bin\wssm.exe", For a Virtual Machine deployed in Horizon Cloud on Azure platform, the path to the wssm executable differs in the userinit string. C:\Windows\System32\userinit.exe,"C:\Program Files\VMware\Horizon Agents\Horizon Agent\bin\wssm.exe", Note: The trailing comma is necessary. It ensures that any settings added by another piece of software or GPO are delimited as necessary. Most errors related to this occur because the installation routines are not configured to place the comma at the end of the string; the key is corrupted because it is not read properly unless it is delimited correctly.To check the current userinit string: Log in to your virtual desktop, the template your virtual desktop pool is based on, or the virtual machine base image that you are using for your virtual desktops.Click Start > Run, type regedit and press Enter. The Registry Editor window opens. Note: Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft article 136393. Navigate to: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon The userinit entry is located here.Edit the userinit string if necessary. Ensure there is a comma between each program executable path. If there is not, edit the string so that there is a comma between each entry, remembering to add the trailing comma at the end of the string.Restart the virtual desktop to commit the changes.If you are editing a virtual machine base image, power down the base image, take a snapshot, and recompose using the new snapshot as your base image. For more information, see Understanding virtual machine snapshots in VMware ESXi and ESX (1015180).
Understanding VM snapshots in ESXi / ESXuserinit 文字列が適切に構成されていることを確認する确认已正确配置 userinit 字符串