Changes the Terminal Services setting for .INI file mapping.
CHANGE USER /?
CHANGE USER /execute
CHANGE USER /install
CHANGE USER /query
Use change user /install before installing an application to create .INI files for the application in the system directory. These files are used as master copies for user-specific .INI files. After installing the application, use change user /execute to revert to standard .INI file mapping.
The first time you run the application, it searches the home directory for its .INI files. If the .INI files are not found in the home directory, but are found in the system directory, Terminal Services copies the .INI files to the home directory, ensuring that each user has a unique copy of the application .INI files. Any new .INI files are created in the home directory.
Each user should have a unique copy of the .INI files for an application. This prevents instances where different users might have incompatible application configurations (for example, different default directories or screen resolutions).
When the system is in install mode (change user /install), several things occur. All registry entries that are created are shadowed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install. Keys added to HKEY_CURRENT_USER are copied under the \SOFTWARE key, and keys added to HKEY_LOCAL_MACHINE are copied under \MACHINE. If the application queries the Windows directory using system calls, such as GetWindowsDirectory, the Terminal server returns the systemroot directory. If any .INI file entries are added using system calls, such as WritePrivateProfileString, they are added to the .INI files under the systemroot directory.
When the system returns to execution mode (change user /execute), and the application tries to read a registry entry under HKEY_CURRENT_USER that does not exist, Terminal Services checks to see whether a copy of the key exists under the \TerminalServer\Install key. If it does, the keys are copied to the appropriate location under HKEY_CURRENT_USER. If the application tries to read from an .INI file that does not exist, Terminal Services searches for that .INI file under the system root. If the .INI file is in the system root, it is copied to the \Windows subdirectory of the user's home directory. If the application queries the Windows directory, the Terminal server returns the \Windows subdirectory of the user's home directory.
When you log on, Terminal Services checks whether its system .INI files are newer than the .INI files on your computer. If the system version is newer, your .INI file is either replaced or merged with the newer version. This depends on whether or not the INISYNC bit, 0x40, is set for this .INI file. Your previous version of the .INI file is renamed as Inifile.ctx. If the system registry values under the \TerminalServer\Install key are newer than your version under HKEY_CURRENT_USER, then your version of the keys is deleted and replaced with the new keys from under \TerminalServer\Install.Examples