This article describes the Fast User Switching feature that enables multiple-user sessions to run at the same time. Also, the article describes how to create a multiple-desktop environment.
There are several parts of the operating system that interact with the Fast User Switching feature:
- Winlogon: This is the logon subsystem of Windows XP. Winlogon includes Winlogon.exe, Msgina.dll, and other components that provide user identification and authentication services to the operating system.
- Windows user subsystem: This contains support for the desktop programming interfaces that support the creation of multiple desktops and the setting of the currently visible desktop.
- Security subsystem: This contains the security functionality of Windows, which includes support for access control lists (ACLs) and user security tokens.
- Windows shell: This is the user interface of Windows. It contains the Start menu, the taskbar, the file and folder management user interface, and Control Panel.
To log on to a computer that has the Fast User Switching feature enabled:
- When the computer first restarts, it starts at the Welcome screen. At this screen, the user enters the appropriate identification information and, if necessary, enters a password. The Welcome screen is on a desktop known as the Winlogon desktop, which is sometimes referred to as the secure desktop because other programs cannot be run on this desktop.
- After the user has entered the appropriate identification information, the credentials of the user are authenticated by Winlogon.
- The token and profile information of the user are returned to Winlogon by the Msgina.dll file.
- Winlogon checks the list of users that are currently logged on to the computer. If the user is already on the list, Winlogon switches to the existing desktop of the user, and the logon process is complete.
- If the user is not already logged on to the computer, Winlogon creates a new thread for this user and transfers the information to that thread.
- The thread of the user creates a new desktop for this user, sets up the user environment, and then starts the user shell on the newly created desktop. The thread and desktop information are added to the list of users that are currently logged on to the computer. Winlogon switches to the new desktop of the user, and the logon process is complete.
To log off from a computer or switch users to a computer that has the Fast User Switching feature enabled:
- The threads of the user wait for the log off from event that is associated with the thread that is going to be signaled (which occurs when the user logs off from the computer). When the user logs off from the computer, the thread of the user is finished.
- At any point prior to logging off from the computer, the user can initiate an action (for example, Switch User) that can return the computer to the Welcome screen without signaling to the thread of the user that a log off from event has occurred. When this behavior occurs, the user desktop continues to run and all programs that have been started on that desktop continue to run. The user is unable to observe any of these programs because the desktop is hidden. The desktop is reported to be "switched out", but it is still active.
- When the computer displays the Welcome screen, any user can be identified and authenticated. If a user already has an active desktop that is switched out, that desktop becomes the active desktop. The state of the program of the user is maintained because none of the programs needed to be shut down when the user had been switched out. If the user does not have a switched-out desktop, a new desktop is created for that user.
The following services use the Fast User Switching feature:
- Terminal Services: This provides a multiple-session environment that enables multiple users to be logged on to the computer at the same time. If this service is not started, only one user can log on to the computer at a time.
- Fast User Switching Compatibility Services: Some programs had been designed only to run in a single-user environment. This service provides assistance to many of those programs to enable them to run in a multiple-user environment
Article ID: 294737 - Last Review: January 15, 2006 - Revision: 1.2
- Microsoft Windows XP Professional
- Microsoft Windows XP Home Edition