Microsoft

Get IT Done: Windows XP's fast user switching

Windows XPs fast user-switching feature can be useful when multiple users need to work from a single PC


If multiple users need to share a single PC, Windows XP's fast user-switching feature can help. Fast user switching is new to Windows XP and is designed so that if someone is in the middle of working in an application and someone else needs to use the computer, it's possible to put the current session on hold and then switch to the alternate user. Once the alternate user has finished using the computer, the original user can resume his or her session. In this Daily Feature, I'll explain how fast user switching works, examine some of its limitations, and discuss potential problems.

Restrictions
Before I get into the specifics of how fast user switching works, there are a couple of restrictions that I want to discuss. The ability to use fast user switching depends on the version of Windows XP you're using, the computer’s network configuration, and the system's memory amount.

For computers running Windows XP Home Edition, fast user switching is enabled by default as long as the computer has at least 64 MB of RAM. In Windows XP Professional, fast user switching is also enabled by default as long as the machine has at least 64 MB of RAM and is not a member of a domain. If the computer is part of a domain, fast user switching is disabled.

This minimum requirement of 64 MB is misleading, however, as Microsoft Knowledge Base Article 331841 clearly states that fast user switching will be disabled if the PC's total amount of free RAM drops below 120 MB. According to Microsoft, this can be a common problem on PCs that use RAM for video memory. In such situations, your only options are to close open applications or install more RAM.

Fast user switching is also disabled in both versions of Windows if the file MSGINA.DLL (the Microsoft Graphical Identification and Authentication file) has been replaced by a third-party application. If this is the case, you can solve the problem by restoring the default Windows logon interface. Just open the Registry Editor and remove the string value:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\Winlogon\GinaDLL


Check out Microsoft Knowledge Base Article 302346 for more information.

Application compatibility
One of the biggest issues with fast user switching is that when you switch between users, any open applications are left open. Because the other users are running completely independent sessions, there's a chance they could run the same application that is already open. Normally, this would cause a huge problem because many applications aren’t designed for multiple-session environments.

If a user leaves an application open and then another user logs in and opens the same application, Windows must take some sort of action to prevent a crash (unless the application was designed for multiple users). This is where the Fast User Switching Compatibility service comes in. This service detects multiple instances of a common application and takes one of four actions to prevent system problems. These actions are:

1. Close the open application
The first action the service may take is to close the application in the previous session. This is the least intrusive action and is also the most reliable because it guarantees that only a single instance of the application will be running at any given time.

When this action is used, the second user will actually see a message indicating that the first user has the application open. Windows will then ask if the second user wants to close the first user’s application before opening his or her own copy. The problem is that in order for this technique to work, the second user must have administrative privileges. Otherwise, the second user lacks sufficient permissions to tamper with the other user’s session.

2. Close all open applications on disconnect
The second action is to close any open programs when a session is disconnected. This is the most intrusive option. In this case, as soon as the user logs off, all open programs are closed immediately and Windows returns to the logon screen. Normally, you'd use this option only in conjunction with applications that are very persistent. For example, many of the DVD player software applications will continue to play a movie regardless of whether someone is logged in. Such an application would need to be terminated prior to returning to the sign-on screen.

3. Close some applications and leave others alone
The third option is a variation of the second. Some applications are intrusive but do not necessarily have to be shut down as soon as a user logs off. For example, if the current user is playing an MP3 file, the next user probably wouldn’t want to log on and find the MP3 file still playing. However, the MP3 file will not disrupt the logon screen if the current user logs off. Therefore, there's no reason to stop playing the file just because the current user logged off. After all, there's a chance that the user could log right back on, and if that happened, it would be nice if Windows were still playing the requested music.

4. Close and restart the application
The final way that Windows deals with open programs is to close a program on disconnect and restart the program on reconnect. For example, suppose a user has his or her PDA connected to the PC and has it configured to automatically synchronize files with the PC. If another user logged in and the PDA continued to synchronize files, it could be a disaster. The PDA might end up with the other user’s files, or the files stored on the PDA might be replicated to a user other than the one the files belong to.

In this case, it would be appropriate to terminate the synchronization at the time the user logs out, but to automatically restart the synchronization process when the user logs back on. By doing so, Windows could ensure that the user’s PDA is always synchronized and that the PDA will never attempt to synchronize with another user.

Taking control with fast user switching
Now that I've shown you the various ways that Windows can deal with incompatible applications, the real question is how do you implement these various techniques? To do so, you'll need to use a tool called the Windows Application Compatibility Toolkit (ACT). You can access the toolkit by inserting the Windows XP installation CD and navigating to the Support\Tools folder. Now, run the Act20.exe file. This file will provide you with a link where you can download the toolkit. You can also download the toolkit directly from Microsoft's Web site.

After downloading the toolkit, you'll find that the installation process is pretty standard. After installation completes, run the Compatibility Administrator tool. If you have an application for which you need to fix the fast user switching behavior, then you'll have to create a new entry for the program within the custom database. To do so, select the new database, right-click on it, and select the Create New | Application Fix commands from the resulting shortcut menu. Windows will ask you for the name of the application you're fixing, the name of the application’s vendor, and the location of the executable program. Enter this information and click Next.

The following screen will ask you which operating system Windows should emulate when running the application. You can also specify other compatibility fixes, such as running the application in 256-color mode. At this point, you can either test-run the application or click Next to move on. After you click Next, you'll see a list of the various compatibility fixes that you can apply to an application. Fast user switching is controlled through the FUSBadApplicationType option. Normally, fixing an application isn’t something that you'd need to do. The Compatibility Administrator contains hundreds of applications that have already been fixed.

RAS behavior
When using fast user switching, you need to consider the behavior of a RAS connection. A RAS connection is often used to establish Internet connectivity or to connect to your office via a VPN or a standard dial-up connection. The way RAS behaves when you switch users depends on how Windows is configured.

If you're using a RAS connection and Windows is set either to not save the password or to save the password only for you, RAS will automatically disconnect from the remote host anytime you log off or switch users. If Windows is set to save passwords for anyone, though, a RAS connection will remain connected while the user switching occurs. However, if you log out rather than disconnect, Windows will ask whether you want to leave the session connected.

A VPN connection works similarly. If a user is using a VPN session and logs out or switches users, then the session will be automatically disconnected, assuming that Windows is configured not to save passwords or to save passwords only for you. If, however, Windows is configured to save passwords for everyone, then the VPN session will remain connected even if the current user logs out or switches to a different user.

Miscellaneous problems and additional reading
In addition to the issues that I've discussed so far, there are a variety of other problems that may occur with fast user switching. For example, the image on the monitor may appear at an incorrect size or the mouse pointer may disappear. In such cases, the easiest solution is to simply restart the program that’s having the problems or to reboot Windows.

For more information on Windows XP's fast user switching, check out the following Microsoft Knowledge Base Articles:

Editor's Picks

Free Newsletters, In your Inbox