The following guidelines describe programmatic behavior that is necessary for an application to operate efficiently and effectively in the Terminal Services environment. There are three main areas where applications tend to run into trouble in a Terminal Services environment:
Installation.
Separation of user and global data.
Programming for the multiuser.
In addition, Windows NT 4.0 Terminal Server Edition has some restrictions on DCOM usage.
Installation
Application installation is different when Terminal Services is enabled in Windows 2000 Server. The registry and .ini file mapping support that is built into Terminal Services allows applications that were not originally designed to run in a multiuser environment to run correctly under Terminal Services. This means that users should be able to execute these applications simultaneously and save whatever preferences the application allows for each of them. Of course, each user must have a unique home directory. If no home directory is specified for a user by the administrator, the user’s home directory defaults to his or her user profile directory, \Wtsrv\Profiles\Username.
To enable each user to retain individual application settings, he or she must have a unique copy of the appropriate .ini files or registry entries. To accomplish this, Terminal Services replicates the .ini files and registry entries from a common system location to each user as necessary. For .ini files, this means that the .ini files in the system directory (%systemroot%) will be copied to each user’s Windows directory. For registry entries, the registry entries will be copied from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software to HKEY_CURRENT_USER\Software.
In order for Terminal Services to replicate the necessary registry entries or .ini files for each user, the user must install the application in Install mode. This is accomplished by using Add/Remove Programs in Control Panel. Install mode may also be enabled from the command line after executing the change user /install command, though using Add/Remove Programs is preferable. If the administrator uses this function, application installation should properly allow for user-specific application settings. The built-in Windows Installer service included in Windows 2000 Server will be the best way for application developers to ensure correct installation. For more information on the Windows Installer service, see the current guidelines for the Windows 2000 Logo program
|