The command changes user in Windows

  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
4.3 ★ | 3 Vote

May be interested

  • The CREATE USER command in SQL ServerThe CREATE USER command in SQL Server
    this article will show you in detail how to use the create user command in sql server, with specific syntax and examples to better visualize and capture commands.
  • Guide 5 ways to delete User accounts on Windows 10Guide 5 ways to delete User accounts on Windows 10
    when deleting user accounts that you do not use can free up memory capacity significantly, even your computer runs smoother than the original.
  • Sub-commands in nslookup Windows command (Part 2)Sub-commands in nslookup Windows command (Part 2)
    nslookup set all command, nslookup set class, nslookup set d2, alias ​​nslookup set debug, nslookup set domain, nslookup set port, and nslookup set querytype in windows
  • Sub-commands in the nslookup Windows command (Part 1)Sub-commands in the nslookup Windows command (Part 1)
    nslookup command exit, finger nslookup, nslookup help, nslookup ls, nslookup lserver, nslookup root, commandlooklook server, nslookup set in windows
  • DROP USER command in SQL ServerDROP USER command in SQL Server
    this article will show you in detail how to use the drop user command in sql server with specific syntax and examples to better visualize and capture commands.
  • Sub-commands in nslookup Windows command (Part 3)Sub-commands in nslookup Windows command (Part 3)
    nslookup set recurse, nslookup set retry, nslookup set root, nslookup set search, nslookup set srchlist, nslookup set timeout, nslookup set type, nslookup set vc, and nslookup view in windows
  • How to Manage Users in LinuxHow to Manage Users in Linux
    unlike windows, as a unix-like system, linux was conceived of as a multi-user system from its inception. the following sections deal with user management through the linux command line. type adduser -d /home/users/ into the command line.
  • Command at in WindowsCommand at in Windows
    the at command schedules commands and programs to run on a computer at a specified time with a specific date. you can only use the command at when schedule service is running.
  • How to Hack Into a Windows User Account Using the Net User CommandHow to Hack Into a Windows User Account Using the Net User Command
    if you're administering a computer and need to access another user's account, you can use the 'net user' command to change their password. if you are locked out of your computer, or don't have administrator access, you can use a windows...
  • Choice command in WindowsChoice command in Windows
    the choice command prompts the user to select an item from the list of single character options in a batch program and then returns the index of that option.