Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

How to deploy applications to your Terminal Server?

Introduction

In the article Basic Concepts of a Terminal Server article I already described the basic concepts/rules necessary to have a stable and controllable Terminal Server Infrastructure.

Two of the described concepts in that article are the chronicle installation order and the 100% equality of all the servers in the Farm.

To accomplish this you should use silent setups and a deploy mechanism to install your applications on you servers. In this article we are going into detail about how to install and deploy those applications with the above mentioned concepts in mind.




Repackaging and/or unattended

 

The first question about installing applications in a silent mode is the method used for creating this silent mode.

In lot of companies repackaging is used. With this method an application is recorded with the packaging tool. In this recording phase the normal installation is executed when at the same moment the package tool saves every change is made. A very well known manufacturer of packaging software is for example Wise.

The counterpart is installation via unattended options. In this way the manufacturer or used installation creator product delivers several parameters by the installation file. Using these parameters the application can be installed silent without installation dialogs.

Using the unattended method has some big advantages

  • The manufacturer supports the unattended method fully. There are manufactures that do not support problems in their application when the application is repackaged.
  • No additional software need to be purchased.
  • No additional training is required for the persons creating the unattended installations.

Of course repackaging has some advantages in comparison with unattended installation:

  •  Some packaging software has a DLL conflict database system inside.
  • All packages have the same format.
  • With repackaging mostly every application can be created in a silent installation

I prefer the unattended method the most, because of the guaranteed support you get from the manufacturer for creating the silent installation and normal operations questions. But some applications do not have unattended options in their setup, so sometime you should use a repackaging tool to create a silent installation.

Therefore I recommend and see in more and more organizations that both methods are used. Logically in this situations you only use the repackaging tool for create silent installations and advanced options like conflict databases en regression test will not be used (in other words that the biggest and most expensive versions are not required).

Creating the silent application

I always call the creation of a silent installation “scripting the application”, so it does not matter if you are using the unattended method or the repackaging method.

Although it is very difficult t to describe how to create an unattended installation or repackaged installation in detail, it is possible to describe the steps in the process from the start till the end.

A little bit depending of your infrastructure you should define where the application should be installed. This can be done to define the answer on a bunch of questions.

The first question in the row is the application capable running on a Terminal Server. Some applications are just not possible because for example external hardware, special applications like programming software or CAD/CAM applications.

If the application could be run on Terminal Server the following questions could be answered to define on which Silo the applications should be installed.

Is the application CPU and/or memory intensive?

  •  Does the application using the CPU unnecessary on a regular base?
  •  Have the application conflicting DLL’s or conflicts with another application?
  • Need the application another application to function (also for the end-user)?
  •  Does the application support another application?
  • How often updates are released for the application normally?
  • How many users are going to use the application?
  • How often is the application being used by the end-users?

The combination of answer of those questions helps you a lot with the decision where to install the application. After this decision the real creation of the silent installation can start.

The first step is to install the application manually. In this way you already know which information is needed during the installation. Also you can already check with tools like filemon, regmon and/or regshot where the application saves files and registry settings. Do not forget to place your Terminal Server in installation mode, so you are aware if Current User Keys and Values in the registry are set.

About the way to repackage applications is already lot of information available in articles and books, so I’m not going to write anything about that. But I will write down some unattended tips and tricks.

When creating silent installation using the unattended method there are three main steps for creation

  • The manufacture have build in the possibility to install the application unattended using parameters. Mostly these parameters and explanation how to create the unattended installation are mentioned in the manual. But sometimes these options are only mentioned on their website, knowledgebase articles or in their Forum. Also contacting the manufacturer can help to get all parameters.
  • Installshield installations. Often manufactures use Installshield to create a setup for their software. If that is the case you can use the options within Installshield  to create an unattended installation. You should install the application once using the /r parameters. This records all installation information in a setup.iss file. This file should then be called during the other installations using the /s parameter behind the setup file for unattended installation on the productions servers.
  •  MSI installations. Delivering application installation using MSI installations is getting more and more popular. Using the standard available executable in the Windows Operating System MSIEXEC MSI files can be run unattended. Via the MSIEXEC /? Command or the Knowledgebase article http://support.microsoft.com/default.aspx?scid=kb;en-us;227091 the parameters can be found.

After the unattended installation is created you are able to install the application silent on your Terminal Servers. But as described in the article Basic Concepts of a Terminal Server there are two parts. The second part is the configuration of the application. You can think of machine registry setting (within HKLM) and/or configuration files. When using repacking for creating a silent installation I advice to keep this kind of configuration settings out of the installation. If changes are needed to this configuration later, it can be implemented easily. 

The machine part is now finished, which makes us to step into the next phase, the user configuration. When we installed the application manual we already checked the so-called Shadow key. I suggest removing those settings out of the Shadow key and placing the settings in a login script or something similar. In the article Basic Concepts of a Terminal Server I explained the reason to do this, please don’t forget to clean the shadow key after the silent installation. Also lots of applications have the first time configuration questions like accepting the license agreement, choosing some setting, tips and tricks screen and many more. Probably you do not want your users to see all this questions and provide them directly with a fully functional application. You can got to know all these setting by starting the application your self and monitor with regshot which registry keys are changed (in 95% of the cases these settings are registry settings).

Also there are some good websites where application installers describes this kind of settings, for example I really like http://www.appdeploy.com. 

Deployment of the applications 

Now the silent installations are ready the last step is deploying those installation to the target servers. The only way to guarantee that all servers are 100% identical is again the chronological order concept. There are lots of deployment products available. Ensure that your deployment product can guarantee that all silent applications package are installed in exactly the same order on every server. Some product uses their internal ID’s as sort order (like Altiris) instead of your self-created order, so be careful. Test and monitor the deployment first in your test environment. I have some good experiences with Altiris,  RES Wisdom and VisionApp Management Suite, but there are guaranteed more products that will satisfies in the needs for chronological installation order.

Conclusion 

To ensure the basic concepts applications need to be installed via silent installations. This can be done using repackaging or unattended methods. The ways to create unattended installations are described including configuration of the environment for the machine part. User configuration can be found in the Shadow key and on several resource site dedicated to packaging. The silent installation should be deployed using a deployment tool which can handle chronological installation order.

Article previous published at MSTerminalServices.org.