Microsoft KB Archive/319921

= QUERY USER command does not return information from a Windows 2000 Server Terminal Server session =

Article ID: 319921

Article Last Modified on 10/26/2006

-

APPLIES TO


 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Server

-



This article was previously published under Q319921





SYMPTOMS
You may receive an error message if the following conditions are true:
 * A user is running a terminal server session on a remote Microsoft Windows 2000-based computer.
 * You try to query the user by using the query user command.

In this scenario, you may receive the following error message:

No user exists for username

For example, you may receive this error message if you run the following command:

query user  /server:

However, when you run the query user command and do not specify the user name, the command correctly lists all the terminal server user sessions on that server. For example, the query works if you run the following command:

query user /server:



CAUSE
This problem occurs because the query user command queries the local server for a user only if you specify the user name.



Service pack information
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to obtain the latest Windows 2000 service pack

Hotfix information
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version        Size    File name ---  11-Apr-2002  16:42  5.0.2195.5572  21,776  Msg.exe 11-Apr-2002 16:43  5.0.2195.5572  17,680  Quser.exe 11-Apr-2002 16:44  5.0.2195.5572  23,312  Qwinsta.exe 13-Jun-2001 05:05  5.0.2195.3727   3,856  Svcpack1.dll



WORKAROUND
To work around this problem, use one of the following methods:  Query the remote server, and do not type the user name. To list all the terminal server sessions on the remote server, type the following command:

query user /server:

 To obtain a single user listing, send the output of the command by using the find command:

query user /server: | find

 Create a batch file to query for a single user. For example, type the following text in the batch file:

query user /server:%1 | find &quot;%2&quot;

Save the file as Tsusers.bat, and then type the following command at a command prompt:

tsusers





STATUS
This problem was first corrected in Windows 2000 Service Pack Service Pack 4.Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the following article number to view the article in the Microsoft Knowledge Base:

265173 The Datacenter program and Windows 2000 Datacenter Server product

For additional information about how to install multiple hotfixes with only one restart, click the following article number to view the article in the Microsoft Knowledge Base:

296861 How to install multiple Windows Updates or hotfixes with only one reboot

Keywords: kbhotfixserver kbqfe kbqfe kbbug kbfix KB319921

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.