Product Documentation

Removing and Reinstalling XenApp

May 08, 2015
Tasks you might need to perform to remove servers from your farm or remove XenApp software from a server include:
  • Removing XenApp from a computer in your farm or forcing its removal
  • Repairing a XenApp installation
  • Reinstalling XenApp after a hardware failure, which includes renaming the server
  • Removing a server from a farm or moving it to another farm
  • Removing a server from your farm if the hardware hosting XenApp fails

Removing XenApp

Citrix recommends that you remove XenApp by using Control Panel > Programs and Features while the server is still connected to the farm and the network. Select Citrix XenApp <version>, click Uninstall. After the program is finished, restart the server.

This method removes the host information from the farm data store and removes the server from the farm properties displayed in the management tools.

To remove XenApp remotely, you can do so from within a Remote Desktop Connection (RDC) session or using tools such as Microsoft Configuration Manager 2007 (formerly Systems Management Server (SMS)).

If you want to remove only specific components of XenApp, do so in the following order:
  • Citrix Management (such as Delivery Services Console)
  • XenApp Advanced Configuration utility or Presentation Server Console, if installed
  • Citrix XenApp
  • Citrix Web Interface
  • Citrix Licensing

Alternatively, to uninstall XenApp and all its components from a command line, use the XenAppSetupConsole.exe /uninstall:XenApp command. From the server console, run XenAppServerSetup.exe. For more details about using these commands, see Configuring XenApp from the Command Line.

Forcing the Removal of XenApp

To force the removal of XenApp from a computer, you can use msiexec on a command line to add the property: CTX_MF_FORCE_SUBSYSTEM_UNINSTALL. Set its value to Yes.

The following sample command line enables logging of the uninstallation operation and forces the removal of XenApp:

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

where mps.msi is the name and location of the msi package.

Repairing a XenApp Installation

Before you start, log off from all sessions and exit any applications running on the server. After you finish, restart the server when prompted.

When you run the repair utility from Control Panel > Programs and Features, XenApp overwrites all files and settings with those from the original installation. If you customized any of the files or features in your XenApp installation, running the repair utility replaces your customizations with the original files and settings.

Reinstalling XenApp Due to Hardware Failure

If the hardware for a server fails and needs to be replaced, change its name to the same name as the failed server before you connect its replacement server to your network. Assigning the replacement server the failed server’s name lets the replacement have the same properties and functionality as the failed XenApp server. The records in the data store for the old server apply to its replacement of the same name.

Ensure that the replacement server settings are identical to the failed server, including:
  • Server name
  • Operating system
  • Settings for applications made during installation or when the application was published
  • User accounts

Renaming a XenApp Server

Caution: Using Registry Editor incorrectly can cause serious problems that can require you to reinstall the operating system. Citrix cannot guarantee that problems resulting from incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Make sure you back up the registry before you edit it.
To rename a XenApp server:
  1. Create a Citrix local administrator account on the server you want to rename.
  2. On the server you want to rename, run chglogon /disable to prevent users from logging on to the server.
  3. Open the Delivery Service Console on a different server, and remove the server to be renamed from published applications assigned to that server.
  4. On the server you want to rename, stop the Citrix Independent Management Architecture (IMA) service.
  5. In the Registry, set the HKEY_LOCAL_MACHINE\SOFTWARE\ Wow6432Node\Citrix\IMA\RUNTIME\PSRequired registry value to 1.
    Caution: Not changing the PSRequired registry value to 1 can result in incomplete records in the data store. Changing this value to 1 forces the Citrix Independent Management Architecture service to communicate with the data store and create a record for the newly named server.

    The value for PSRequired reverts to 0 the next time the Citrix Independent Management Architecture service restarts.

  6. Change the name of the server in the server operating system and restart the server.
  7. Log on to the console using the local administrator account you created.
  8. Update all references to the old server to the new server name. For versions prior to 6.0, this might require logging on to the XenApp Advanced Configuration tool or Presentation Server Console as well.
    Important: Before removing the old server name, change all objects that reference the old name to the new server name, including data collector ranking, published application references, load evaluators, and zone settings.
  9. Expand the Servers folder and remove the old server name from the list of servers.
  10. Add the new server name to the list of configured servers for published applications.

Removing a Server From a Farm

Caution: If you remove all servers belonging to a single domain and have Citrix administrators in the domain, their user accounts cannot be enumerated by the Delivery Services Console and appear as a question mark (?) in the list of Citrix administrators.

To remove a server from a farm, use the XenApp Server Configuration Tool to leave the farm or join the server to another farm. Access the Server Configuration Tool from the Server Role Manager or use XenAppConfigConsole.exe from the command line. (For information on using XenAppConfigConsole.exe, see Configuring XenApp from the Command Line.)

If you cannot use the Server Configuration Tool – for example, because the hardware for the server fails or the server cannot be started – use this alternative method to remove the server from the farm:
  1. Open the Delivery Services Console from another server in the farm.
    1. In the left pane, select the server you want to remove.
    2. From the Action menu, select Other Tasks > Remove from farm.
  2. Run the dscheck command on the farm’s data store to repair any consistency errors.
  3. If you want reuse the server, Citrix recommends reimaging the server and reinstalling XenApp before joining the server to a farm.

Backing Up and Restoring the XenApp Data Store

Many data store maintenance tasks are performed using the DSMAINT and DSCHECK commands. For more information, see the Command Reference and Data Store Database Reference documentation.