Issues Performing VDA Install & VDA Uninstall VDA (Using command line)

book

Article ID: CTX695444

calendar_today

Updated On:

Description

When you are performing the VDA installation or VDA uninstallation



Install Command
 
** Watch for the return code from the VDA installer [0, 3 or 8: Success, installation complete, restart required ] **

** Treat any other return code as an error, and SCCM TASK3 should report an error and end **

** The VDA installation (with any of the 3x switches included [ /QUIET /NOREBOOT /NORESUME ] for a first time VDA clean installation, may result in a partial installation (only MS prerequisites C++ and require a reboot) **

** After the reboot, you will need to run the installation command again (this time the main VDA Core components should install and require a reboot to complete) **




Uninstall Command


** The Uninstall command should only need to be run once **

** The VDA components (appear to be removed from Control panel [Appwiz.cpl] but the uninstallation is not complete )**

** MS Installer Code 3010 will appear for some components [ That means the MSI removal succeeded but a reboot is required to unload drivers/services/file handles and complete cleanup ] **
 
** The Uninstall XenDesktop wrapper changed the final return from SuccessRebootNeeded to PartialSuccessAndRebootNeeded because some components requested reboot (3010). **
 
** Overall the installer marked the attempt as PartialSuccessAndRebootNeeded. [A reboot is still required to finalize] **



Additionally
=========

Kernel-mode drivers (e.g. ICA print driver, graphics, audio hooks)
 
- These install as .sys drivers tied to the Windows kernel.
- The uninstaller can’t fully unload/remove them.
- Windows Installer (msiexec) will return 3010 (0x00000BC2), meaning: “I did everything I could, but a reboot is needed to complete cleanup.”

 
 

Services with open handles (e.g. Telemetry, EUEM, SmartCard, Portica)

- If the service is running or has dependent COM/registry handles, the MSI may stop it but cannot fully unregister DLLs or COM classes.
- The system marks those files/keys for delete-on-reboot. (Reboot finalizes the removal)


image.png

Environment

The use of custom scripts is at your own risk. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CITRIX AND ITS SUPPLIERS MAKE AND YOU RECEIVE NO WARRANTIES OR CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND CITRIX AND ITS SUPPLIERS SPECIFICALLY DISCLAIM WITH RESPECT TO THE PRIVATE ANY CONDITIONS OF QUALITY, AVAILABILITY, RELIABILITY, SECURITY, LACK OF VIRUSES, BUGS OR ERRORS, OR SUPPORT AND ANY IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER CITRIX, ITS SUPPLIERS SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, MULTIPLE, PUNITIVE OR OTHER DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF DATA, LOSS OF INCOME, LOSS OF OPPORTUNITY, LOST PROFITS, COSTS OF RECOVERY OR ANY OTHER DAMAGES), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, AND WHETHER OR NOT FOR BREACH OF CONTRACT, NEGLIGENCE OR OTHERWISE, AND WHETHER OR NOT CITRIX, ITS SUPPLIERS, OR LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Citrix offers no assurance that this custom script will be incorporated into the commercial version of the associated Citrix product or that it will work with future versions of such product.

Cause

When you are running the VDA installation or Uninstallation & you are using any of the 3x switches (to run silently in the background with no reboots), you will need to follow the SCCM approach: 

- /QUIET: Don’t show the user interface during installation, so that SCCM has control of the installation process.
- /NOREBOOT: Suppress the VDA installer from restarting automatically. SCCM triggers restarts when needed.
- /NORESUME: Usually, when a restart is needed during the installation, the VDA installer sets a runonce registry key (\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce)


With no reboots the installation or uninstallation may not run in one execution (and you need to monitor the install codes carefully)

Citrix installation return codes
- The installation log contains the result of component installations as a Citrix return code, not a Microsoft value.
 
0 = Success
1 = Failed
2 = PartialSuccess
3 = PartialSuccessAndRebootNeeded
4 = FailureAndRebootNeeded
5 = UserCanceled
6 = MissingCommandLineArgument
7 = NewerVersionFound
8 = SuccessRebootNeeded
9 = FileLockReboot
10 = Aborted
11 = FailedMedia
12 = FailedLicense
13 = FailedPrecheck
14 = AbortedPendingRebootCheck
-1 = Exit


Check for Install code 0, 3 or 8
** Install Code 0:Success, Install Code 3 or 8: Installation complete, restart required **
** There is a long standing bug in the Meta Installer that will return 3 (PartialSuccessAndRebootNeeded) instead of an 8 (SuccessRebootNeeded) **


Check for the CitrixVirtualDesktopAgent.xml file (If this exist, the installation or upgrade is still not complete, a reboot is still required)
** [ %programdata%\Citrix\XenDesktopSetup\CitrixVirtualDesktopAgent.xml ]


Check to make sure the following registries are not present
** [ HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending ]
** [ HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired ]

Resolution

When you are performing the VDA installation or VDA uninstallation



Example of the installation command

$Process = start-process -FilePath "C:\Temp\x64\XenDesktop Setup\XenDesktopVDASetup.exe" -ArgumentList '/components VDA,DT,UBERAGENT /disableexperiencemetrics /enable_hdx_ports /enable_hdx_udp_ports /enable_hdx_tls_dtls /enable_real_time_transport /enable_remote_assistance /enable_ss_ports /noreboot /enablerestorecleanup /noresume /quiet /virtualmachine /xendesktopcloud /remove_appdisk_ack /logpath "C:\Temp\Logs" /exclude "Citrix Secure Access Client","Citrix Workspace Environment Management Agent","Citrix MCS IODriver","Citrix Personalization for App-V - VDA","Citrix Rendezvous V2","Citrix Telemetry Service","Citrix Universal Print Client","Machine Identity Service","User Personalization Layer","Citrix Personalization for App-V - VDA" /includeadditional "Citrix VDA Upgrade Agent"' -PassThru -Wait
 
$Process.ExitCode



Example shows the installation sequence.
 
SCCM TASK1: Prepare the machine by restarting the machine.
 
SCCM TASK2: Start the VDA installation.
- Add the /quiet, /noreboot, and /noresume options to your command line options.
- Run the VDA installer of your choice (local image or one of the minimal installers).
- Check if CitrixVirtualDesktopAgent.xml exists in the directory location C:\ProgramData\Citrix\XenDesktopSetup.
- If xml is not present, then installation is successful, reboot VDA.
- If xml is present then restart VDA and continue install.
 
SCCM TASK3: Continue VDA installation.
- If CitrixVirtualDesktopAgent.xml exists in the directory location C:\ProgramData\Citrix\XenDesktopSetup, the installation must be continued after the restart completes.
 
SCCM TASK3 repeats until CitrixVirtualDesktopAgent.xml does not exist in the directory location C:\ProgramData\Citrix\XenDesktopSetup.
 
- Resume the VDA installation by running the appropriate VDA installer (XenDesktopVdaSetup.exe for most cases, or XenDesktopRemotePCSetup.exe if VDAWorkstationCoreSetup.exe the was previously used)
 
- Watch for the return code from the VDA installer.
0, 3 or 8: Success, installation complete, restart required.
 

** Treat any other return code as an error, and SCCM TASK3 should report an error and end **

** The VDA installation (with any of the 3x switches included [ /QUIET /NOREBOOT /NORESUME ] for a first time VDA clean installation, may result in a partial installation (only MS prerequisites C++ and require a reboot) **

** After the reboot, you will need to run the installation command again (this time the main VDA Core components should install and require a reboot to complete) **




Example of the uninstallation command

$Process
= start-process -FilePath "C:\Program Files\Citrix\XenDesktopVdaSetup\XenDesktopVDASetup.exe"-ArgumentList '/removeall /quiet /noreboot /logpath "C:\Temp\Logs"' -PassThru -Wait
 
$Process.ExitCode
 
restart-computer



** The Uninstall command should only need to be run once **

** The VDA components (appear to be removed from Control panel [Appwiz.cpl] but the uninstallation is not complete )**

** MS Installer Code 3010 will appear for some components [ That means the MSI removal succeeded but a reboot is required to unload drivers/services/file handles and complete cleanup ] **
 
** The Uninstall XenDesktop wrapper changed the final return from SuccessRebootNeeded to PartialSuccessAndRebootNeeded because some components requested reboot (3010). **
 
** Overall the installer marked the attempt as PartialSuccessAndRebootNeeded. [A reboot is still required to finalize] **

Issue/Introduction

You can run into issues when performing the VDA Installation (using command line method) or VDA Uninstalling (using the command line method)

Additional Information

VDA installation via (Command Line)
- https://docs.citrix.com/en-us/citrix-daas/install-configure/install-vdas/install-command.html

VDA installation via (SCCM)
- https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/install-configure/install-vdas/third-party-vda-deployment-methods/install-vdas-sccm.html

VDA Install Codes
- https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/1912-ltsr/install-configure/install-prepare.html



If there is issues uninstalling the VDA software using the Control Panel [appwiz.cpl]

- Please confirm if the VDA cannot be uninstalled via VDA Clean-Up Utility: https://support.citrix.com/external/article/CTX209255/citrix-vda-cleanup-utility-tool.html

- Please verify under the registry for the Citrix Components GUID [ HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall ] or [ HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall ]

  ** Run the following for any lingering components CMD:> msiexec /x {GUID} 
  ** Example: msiexec /x {A1C404E3-0E09-4BE4-BBCB-D2A5F76707DB}