Installing Applications for Windows Server 2008 Terminal Services

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
Windows Server 2008 Terminal ServicesConfiguring RemoteApps on Windows Server 2008


Purchase and download the full PDF and ePub versions of this eBook only $9.99


The previous chapter covered the basic installation and configuration of Terminal Services on Windows Server 2008. Once this task has been completed the next step is to install applications on the Windows Server 2008 system for use by multiple remote users. It is important to note that, firstly, applications must be installed specifically for use by Terminal Services users and, secondly, that not all applications are designed to be run by multiple concurrent users. With these constraints in mind, this chapter will cover the basics of safely installing applications on Windows Server 2008 for use by remote users via Terminal Services.

This chapter will focus on installing applications in the context of remote desktop access (where a remote user accesses a full desktop session on the remote server to launch applications). To have each remote application run within its own window on the local client it will be necessary to configure the applications as RemoteApps, a topic which is covered in detail in the Configuring RemoteApps on Windows Server 2008 chapter of this book.


Contents


Understanding Terminal Services Operating Modes

Terminal Services on Windows Server 2008 function in two different operating modes known as Execute mode and Install mode. Terminal Services are in Execute mode when a client are connected and applications are being executed by users. Install mode is entered when applications are being installed for use by client users. Essentially, when in Install mode Windows ensures that the appropriate registry entries and .ini file settings are configured for the application to function in multi-user mode.

If applications are being installed using the Install Application on Terminal Server wizard via the Control Panel then the operating mode is automatically switched to Install mode during installation and then back to Execute mode on completion. If an installation needs to be performed from the command prompt the mode can be changed using the switch user command. The following example switches to Install mode, performs the installation and then reverts to Execute mode:

C:\Users\Administrator>change user /install
User session is ready to install applications.

C:\Users\Administrator>setup.exe

C:\Users\Administrator>change user /execute
User session is ready to execute applications.

In addition, the current mode may be queried using the /query option:

C:\Users\Administrator>change user /query
Application EXECUTE mode is enabled.

Installing Terminal Server Applications using Control Panel

Once Terminal Services are installed on Windows Server 2008, an Install Application on Terminal Server option will appear in the Programs section of the Control Panel. To install an application for Terminal Services invoke this tool by clicking on the icon. If the application to be installed is contained on CDROM or DVD media, insert the media into the appropriate drive and click on Next. If the installation executable is on a disk drive or network location click on Next and wait while the tool searches for the installation media. When none is found the tool will provide the option to browse for the installer:

Installing an application on Windows Server 2008 Terminal Server


Click on the Browse... button and navigate to the installer. Once selected click on Next to begin the installation. The installer will then run as usual. Once installation is complete, click on the Finish button in the Install Application on Terminal Server wizard: <google>WIN28BOX</google>

Terminal Server Application Installation Completed


If the application is designed for multi-user use it is now ready for use by remote users via Terminal Services. Applications which are not multi-user compatible may need to use compatibility scripts.


Terminal Server Application Compatibility Scripts

For applications not designed to work in mutli-user environments there a number of tricks that can be performed.

If the application uses a fixed path name for user files that will cause problems when there are multiple users a useful trick is to map these paths to a drive letter and then set the drive to point to different paths for each user. For example, user Bill might have drive letter E: mapped to C:\users\bill\data while user Joe would have E: mapped to C:\users\joe\data.

Another option is to use compatibility scripts which get executed each time a remote user launches an application. Windows Server 2008 provides two sample scripts located in %SystemRoot%\Application Compatibility Scripts. RootDrv.cmd maps a drive letter to the home directory of the user executing the script enabling the trick outlined above to be performed automatically.

The SetPaths.cmd script converts common paths (such as My Documents) into environment variables thereby avoiding the use of hardcoded path names. By default the script converts the following paths to the corresponding environment variables:

Path                              Environment Variable
All Users:Startup                 COMMON_STARTUP
All Users:Start Menu              COMMON_START_MENU
All Users:Start Menu\Programs     COMMON_PROGRAMS
Current User:Start Menu           USER_START_MENU
Current User:Startup              USER_STARTUP
Current User:Start Menu\Programs  USER_PROGRAMS
Current User:My Documents         MY_DOCUMENTS
Current User:Templates            TEMPLATES
Current User:Application Data     APP_DATA

Summary

In this chapter of Windows Server 2008 Essentials we have looked at installing applications for use with Terminal Services. The next chapter will look at using RemoteApps display remote applications in their own windows on a client desktop.


Purchase and download the full PDF and ePub versions of this eBook only $9.99