You are currently offline, waiting for your internet to reconnect

Terminal Server Commands: CHANGE

The CHANGE command replaces CHGLOGON, CHGUSER, and CHGPORT from CitrixWinframe.

The change utilities are used to change current settings. The changecommand can invoke any one of the change utilities.

change [logon | port | user] [/?]

/? (help): Displays the syntax for the command and information about thecommand's options.


Disables all logons for system maintenance.


change logon [/enable] [/disable] [/query] [/?]



Enables logons from client sessions, but not from the console.
Disables subsequent logons from client sessions, but not from the console. Currently logged on users are not affected.

Displays the current logon status.

/? (help)
Displays the syntax for the command and information about the command's options.

Security Restrictions:

Only administrators can run CHANGE LOGON.

CHANGE LOGON -- Additional Notes:

The change logon command disables logons from client sessions other thanthe system console. Users that are currently logged on are not affected.Client sessions are always re-enabled when you restart the system. If youare connected to the Terminal Server from a remote location and disableclient sessions, and if you log off before re-enabling client sessions, youwill not be able to reconnect. You need to logon at the system console inorder to re-enable sessions.


Changes the COM port mappings to be compatible with DOS applications.


change portchange port COMx=COMychange port /d COMxchange port [/?]


COMx=COMyMaps COM port x to port y.

/d COMx
Deletes the mapping for COM port COMx.

/? (help)
Displays the syntax for the command and information about the command's options.

CHANGE PORT -- Additional Notes:

Most MS-DOS applications support only COM1 though COM4 serial ports. CHANGEPORT maps a serial port to a different port number, allowing applicationsthat cannot access high-numbered COM ports to access the serial port. Forexample, to map COM12 to COM1 for use by a MS-DOS application, type changeport com12=com1. Remapping works only for the current session and is notretained if you logoff and then log on again.

Run CHANGE PORT without any parameters to display the available COM portsand the current COM port mappings.


Changes the .ini file mapping setting.


change user [/install | /execute | /query] [/?]



Disables the ability to map the .ini files in the home directory. All .ini files are read and written to the Terminal Server system directory. You must disable .ini file mapping when installing applications on a Terminal Server. See the Notes section below for details.

Enables the ability to map.ini files to the home directory. This is the default setting.

Displays the current .ini file mapping setting.

/? (help)
Displays the syntax for the command and information about the command's options.

CHANGE USER -- Additional Notes:

Use change user /install before installing an application to create .inifiles for the application in the Terminal Server system directory. Thesefiles are used as master copies for the user-specific .ini files. Afterinstalling the application, use change user /execute to revert to normal.ini file mapping.

The first time you run the application, the application looks in the homedirectory for its .ini files. If the .ini files are not found in the homedirectory, but are found in the Terminal Server system directory, theTerminal Server copies the .ini files to the home directory. This ensuresthat each user has a unique copy of the application's .ini files. Any new.ini files are created in the home directory. Each user should have aunique (user-specific) copy of the .ini files for an application to avoidinstances where several users have incompatible application setups; forexample, different default directories or screen resolutions.

When the system is put into install mode (change user /install), severalthings happen. All Registry entries that are created are shadowed underHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\TerminalServer\Install.

Keys added to HKEY_CURRENT_USER are copied under the Software key and keysadded to HKEY_LOCAL_MACHINE are copied under MACHINE. If the applicationqueries the Windows directory (using system calls likeGetWindowsDirectory), the Terminal Server returns the %systemroot%directory. If any .ini file entries are added (using system calls such asWritePrivateProfileString), they are added to the .ini files under the%systemroot% directory.

When the system is put back in execution mode (change user /execute),andthe application tries to read a Registry entry under HKEY_CURRENT_USER thatdoesn't exist, the Terminal Server checks to see if a copy of the keyexists under the TerminalServer\Install section of the Registry. If itdoes, the keys are copied to the appropriate location underHKEY_CURRENT_USER. If the application tries to read from an .ini file thatdoesn't exist, the Terminal Server looks for that .ini file under thesystem root. If the .ini file is in the system root, it is copied to thehome directory\Windows. If the application queries the Windows directory,the Terminal Server returns the home directory\Windows.

When you log on, the Terminal Server checks to see if the system .ini filesare newer than the .ini files on your computer. If the system version isnewer, your .ini file is replaced with the newer version or the new entriesin the system version are merged into your .ini file. This depends onwhether or not the INISYNC bit, 0x40, is set for this .ini file. See theAdvanced Installation Topics section of the on-line help for additionalinformation. Your previous version of the .ini file is renamed toInifile.ctx. If the system Registry values under Install\ are newer thanyour version under HKEY_CURRENT_USER, then your version of the keys isdeleted and replaced with the new keys from under Install\.

Article ID: 186504 - Last Review: 06/22/2014 18:57:00 - Revision: 4.0

  • kbinfo KB186504