The command changes user in Windows

The change user command changes the installation mode for the Remote Desktop Session Host server (rd Session Host).

  1. Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The change user command changes the installation mode for the Remote Desktop Session Host server (rd Session Host). To learn examples of how to use this command, please see the Example below.

Note:

In Windows Server 2008 R2, Terminal Services has been renamed to Remote Desktop Services.

Command syntax change user

 change user {/ execute | / install | / query} 

Parameters

Parameter Description / execute Enable mapping of .ini files in the main directory. This is the default setting. / install Disable mapping of .ini files in the home directory. All .ini files are read and written to the system directory. You must disable .ini file mapping when installing applications on rd Session Host server. / query Displays the current settings for the .ini file mapping. /? Show help at the command prompt.

Note

  1. Use the change user / install command before installing the application to create an .ini file for that application in the system directory. These files are used as the source when the .ini file of a particular user is created. After installing the application, use the command change user / execute to revert to the standard .ini file mapping.
  2. The first time you run the application, it will search the main directory for its .ini files. If the .ini file is not found in the main directory, but found in the system directory, Remote Desktop Services will copy the .ini file to the main directory, ensuring that each user has a unique copy. of .ini file. Any new .ini file is created in the main directory.
  3. Each user must have a single copy of the .ini file for an application. This prevents situations where different users may have incompatible application configurations (for example, different default screens or folders).
  4. When the system is in installation mode (ie change user / install ), some things will happen. All registry entries created are hidden under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentversionTerminal ServerInstall , or in the subkey SOFTWARE or MACHINE. Subkeys added to HKEY_CURrenT_USER will be copied in the SOFTWARE subkey and the subkeys added to HKEY_LOCAL_MACHINE are copied in the subkey MACHINE. If the application queries the Windows directory using system calls, such as GetWindowsdirectory, the rd Session Host server will return the systemroot directory . If any .ini file entry is added using system calls, such as WritePrivateProfileString, they will be added to the .ini file in the systemroot folder.
  5. When the system returns to executable mode (ie change user / execute ), and the application tries to read a registry entry that does not exist in HKEY_CURrenT_USER , Remote Desktop Services will check if the copy of the key exists in the subkey. Terminal ServerInstall or not. If so, the subkeys will be copied to the appropriate location in HKEY_CURrenT_USER. If the application tries to read from the .ini file does not exist, Remote Desktop Services will search that .ini file in the system root directory. If the .ini file is in the system root directory, the file will be copied to the Windows subdirectory in the user's home directory. If the application queries the Windows directory, the rd Session Host server will return the Windows subdirectory in the user's home directory.
  6. When you log in, Remote Desktop Services will check if its system .ini files are newer than .ini files on your computer. If the system version is newer, your .ini file will be replaced or merged with the newer version. This depends on whether the INISYNC bit, 0x40, is set for this .ini file or not. The previous version of the .ini file was renamed Inifile.ctx. If the system registry values ​​in the ServerInstall Terminal subkey are newer than your version in HKEY_CURrenT_USER, the version of your subkeys will be deleted and replaced with new subkeys from Terminal ServerInstall.

For example

To disable mapping of .ini files in the home directory, enter:

 change user / install 

To enable mapping of .ini files in the home directory, enter:

 change user / execute 

To display the current settings for the .ini file mapping, enter:

 change user / query 

See more:

  1. Change port command in Windows
  2. Change logon command in Windows
  3. Change command in Windows
Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile