Contents

Force uninstall Citrix

Website Visitors:
Contents

I ran into a problem where I was trying to uninstall XenApp5 from my Windows 2008 server. The uninstall process initially gather’s information about the application installed, and then an error message pops up and kicks off your RDP session, or it simply can’t uninstall XenApp

Essentially you need to open command prompt, browse to the directory where your source mps.msi file is. I copied the source CD to the server so it’s C:\Installs\XA50_WS2008_EN\XenApp Server\w2k8 then type the command:

msiexec /x mps.msi /L*v c:\output.log CTX_MF_FORCE_SUBSYSTEM_UNINSTALL=Yes

Best Practices for uninstalling Citrix:

Before uninstalling any Citrix Server product, consider the following:

  • Ensure that all Hotfixes and Hotfix Rollup Packs are removed before you uninstall. Refer to the hotfix readme for un-installation instructions.

  • If the hotfixes, service packs, or Presentation Server products were installed with Installation Manager or Active Directory, then there might be special uninstall considerations when using methods other than the preferred Add/Remove programs method.

  • CTX105646 – Cpatch.exe – The Citrix Patch Handling Utility

  • CTX101703 – Installing and Uninstalling MetaFrame XP Post FR2 Hotfixes

  • Search the Citrix Knowledge Center for specific uninstall error messages.

Uninstalling XenApp for Windows Server 2008

Refer to Program Install and Uninstall Troubleshooter.

Uninstalling Citrix Presentation Server 4.5 / XenApp 5.0 on 2003

Refer to page 94 of CTX112223 – Citrix Presentation Server 4.5 Administrator’s Guide.

To remove a server from a farm, Citrix recommends that you uninstall the server. This removes the host information from the farm data store and removes the server from the list of servers displayed in the Presentation Server Console and Access Management Console. You can uninstall Citrix Presentation Server using Add/Remove Programs in Control Panel or by using the Windows Msiexec command. For more information about this command, go to the Microsoft Web site and search for msiexec.

Before you uninstall, log off from any sessions and exit all programs running on the server.

Note: The following procedure assumes that you have all installation options installed on the server.

To uninstall, complete the following steps:

  • Exit all applications running on the server.

  • Select Start > Control Panel > Add/Remove Programs.

  • Select Change or Remove Programs.

  • Select Citrix Presentation Server.

  • Select Change.

  • Select Remove in the Application Maintenance Wizard that appears and follow the onscreen instructions.Citrix recommends that you uninstall the Citrix Server and its components in the following order:

  • Citrix Presentation Server—Presentation Server Reports.

  • Citrix Access Management Console—Presentation Server Report Center.

  • All Citrix Access Management Console extensions, as follows:

Citrix Access Management Console—Diagnostics Citrix Access Management Console—Hotfix Management Citrix Access Management Console Knowledge Base Citrix Access Management Console Legacy Tools Citrix Access Management Console—Web Interface

  • Citrix Presentation Server Administration Snap-In.

  • Citrix License Server Administration.

  • Citrix Access Management Console Framework.

  • Presentation Server Console, which is also known as the Management Console for Presentation Server.

  • Citrix Presentation Server.

  • Citrix Web Interface.

  • Citrix Licensing.

  • Citrix Presentation Server Document Center, if installed.

Note: To complete the uninstallation, restart the computer after Presentation Server is removed.

If you need to force the removal from the computer, then you can use the command line to add the following property and set its value to Yes: CTX_MF_FORCE_SUBSYSTEM_UNINSTALL

The following sample command line enables you to log the uninstallation operation and forces the removal of Citrix Presentation Server: msiexec /x mps.msi /L*v c:\output.log CTX_MF_FORCE_SUBSYSTEM_UNINSTALL=Yes Note: mps.msi is the name and location of the msi package.

Files that Remain after Uninstalling

When you uninstall Citrix Presentation Server or Citrix Licensing, some files remain on the server. For more details about which files remain, see the Citrix Presentation Server Readme and Citrix Licensing Readme.

CTX113902 – Presentation Server 4.5 Files that Remain after Uninstalling Components CTX110840 – Readme for Citrix Licensing 4.5 (for Windows)

Important! If you rename a computer running Presentation Server, the new server name is added to the list of servers in the farm. However, you must remove the old server name because it is still listed as a member of the farm. Before you remove the server name, ensure that you update all references to the new server name, including data collector ranking, published application references, and license assignments. If you are planning to uninstall Citrix Presentation Server from the Resource Manager metric farm server or database connection server for a summary database, ensure that you reassign the server before removing it from the farm. If you are using a summary database, Citrix recommends that you update the database before removing any servers from the farm. Ensure that you also create any necessary billing reports from the server before you remove it.

Note: Run DSCheck and/or QueryHR to ensure that the Presentation Server is completely removed from the server farm.

Manually Uninstalling Citrix Presentation Server 3.0, 4.0, and 4.5 when Add/Remove Programs and Command Line Fail

Caution! The following steps might leave your server unusable. The server might need to be rebuilt. Follow these steps only when absolutely necessary.

Caution! This fix requires you to edit the registry. Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Note: If you have upgraded from MetaFrame XP, refer to CTX065796 – Feature Release 2 Directory Structure Changes.

  • Stop and disable all Citrix services.

  • Open Computer Management > Local Users and Groups and delete all local user accounts created by Citrix during the installation such as, Anon000…Anon014, CTX_SmaUser, and ctx_cpsvcuser.

  • Search the drive for the following Citrix files and delete them: CDM CTX **see note below ICA IMA MF MFXPIf there is a question about whether or not the file belongs to Citrix, view theVersion tab within the property settings of the file. When in doubt, it is better not to delete the file.Note: One of the CTX prefixed files is the CTXGina.dll. Once deleted, you must go to the Registry and locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon key and delete the two REG_SZ keys for GinaDLL and CtxGinaDll. When you reboot the computer, the system then defaults to the msgina. By default, these keys do not exist before the installation of Presentation Server.

  • Delete the following items in the registry using Regedt32.exe (take ownership of subkeys if required): HKEY_CURRENT_USER\SOFTWARE\Citrix HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\Citrix HKEY_LOCAL_MACHINE\SOFTWARE\Citrix (x32) HKEY_LOCAL_MACHINE\SOFTWARE\W0w6432Node\Citrix (x64) HKEY_LOCAL_MACHINE\SOFTWARE\Citrix Systems, Inc. HKEY_LOCAL_MACHINE\SOFTWARE\citrixservices HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\CitrixLicensing HKEY_LOCAL_MACHINE\SOFTWARE\Classes\(folders labeled with Citrix, IMACOM, MetaFrame, and ImUtil) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\citrix HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\citrixservices HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ADF Installer HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CdfSvc HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Cdm HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CdmService HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Citrix* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ctx* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CPSVC HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ICABrowser HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\IcaCDD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\icareduc HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\IMAAdvanceSrv HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\imaservice HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MetaFrameXP HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MFCom HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PDCOMP HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pdcrypt1 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pdcrypt2 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pdframe HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PDRELI HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pdrframe HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PnSson HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\RadeSvc HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ResourceManagerMail

  • Edit the computer environment variables and remove Citrix references from paths. Then run the Autoruns utility from Microsoft Sysinternals and remove all references to Citrix and restart the server.

  • Delete the following folders, if present: \Programs Files\Citrix \Programs Files\Common Files\Citrix \Windows\System32\Citrix \Documents and Settings\All Users\Start Menu\Programs\Citrix

  • Search the drive for *.del* and delete all files marked for deletion. Note: When you attempt to delete some files, you might receive the following error message:“Cannot delete file: The specified file is being used by Windows.”If files cannot be deleted, restart in safe mode and try again, or use the Process Explorer utility from Sysinternals to kill the processes involving the locked files and try to delete the files again.Important: If some processes cannot be stopped or if errors appear referring to dll files, then rename all the files in the Citrix folders such that it is not available after a restart. You can use the Flexible Renamer utility to rename the files, using the options shown in the following screen shot:

https://www.mediafire.com/convkey/669c/qezdqrnwla6mxx95g.jpg
Flexible Renamer
  • Restart the server before you reinstall Presentation Server. When you delete all the files and registry entries listed in the previous step, new installation proceeds normally. Restart the server.

  • Ensure that all Citrix programs and software are effectively removed from Control Panel > Add or Remove Programs. If Citrix components still appear, download and run the Windows Installer Cleanup utility from Microsoft.

  • Verify if any Citrix services still appear. If so, use the sc command to remove them. For example: sc delete “Citrix SMA service”

  • Restart the server again.

  • Open Event Viewer and ensure that the Application and System logs do not contain events referring to Citrix.

  • If imaging software is used, this is the moment to create a new image or backup of the server, because at this point the server is as clear as technically possible of all Citrix software.

  • Reinstall the product normally, or create a log of the installation. Example msiexec command: msiexec /i “D:\Citrix Presentation Server\MPS.msi” /l*v c:\log.txt

Posted in CTX746354

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: