Microsoft KB Archive/824223

= Script That Runs a WMIC Command Runs Slowly, and You Cannot Specify a Custom Timeout Value for the WMIC /FAILFAST Switch =

Article ID: 824223

Article Last Modified on 11/4/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Web Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition

-





SYMPTOMS
In Microsoft Windows XP, when you run a script that contains Microsoft Windows Management Instrumentation Command-line (WMIC) commands that are issued to target computers, the script runs slowly and may pause for several minutes if the WMIC /FAILFAST switch is set to ON (/FAILFAST:ON).

In Microsoft Windows Server 2003, when you run a script that contains WMIC commands that are issued to target computers, you cannot change the default five-second timeout value for the target node to respond to a ping request. For example, you may want to change the ping timeout value if you have computers that must respond over slow wide area network (WAN) links. Or, if you have a high-speed network, you may want to change the ping timeout value because you do not want to wait five seconds for the ping timeout if the target node is unavailable.



CAUSE
This problem occurs in Windows XP because, if the /FAILFAST switch set to ON, the WMIC command does not try to ping the target node to see if the target is available. Instead, WMIC retrieves host information (by using the gethostbyname method or the gethostbyaddr method) about the target only from a name service provider, such as Domain Name System (DNS) or Windows Internet Name Service (WINS). If the host name resolves, the WMIC command is tried even if the target node is not available. This process causes delays in the command output.

In Windows Server 2003, when a WMIC command with the /FAILFAST switch set to ON is issued, a ping is sent to the target node. However, if a reply is not received within five seconds, the remainder of the command is aborted.



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

322389 How to obtain the latest Windows XP service pack

Prerequisites
To apply this hotfix, you must have Windows XP Service Pack 1 (SP1) installed on the computer.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.

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

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

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

Prerequisites
No prerequisites are required.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.

Windows Server 2003, x86-based versions

Windows Server 2003, Itanium-based versions



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Windows XP This problem was first corrected in Microsoft Windows XP Service Pack 2.



MORE INFORMATION
The WMIC utility (Wmic.exe), is used to access Windows Management Instrumentation (WMI). Before this hotfix, the WMIC /FAILFAST switch accepted only two values: ON and OFF.

After you install this hotfix, you can also specify a custom timeout value (in milliseconds) for the /FAILFAST switch to use. If you specify a shorter timeout value, WMIC commands do not have to wait as long for a target node to respond to the ping that is issued by a WMIC command. For example, you can use /FAILFAST:1000 to give the target node only one second to respond to the ping request.

The new format for this command-line switch is as follows:

/FAILFAST:{ON|OFF| }

Examples: /FAILFAST:ON or /FAILFAST:OFF or /FAILFAST:1000.

For additional information about WMIC, click the following article number to view the article in the Microsoft Knowledge Base:

290216 A Description of the Windows Management Instrumentation (WMI) Command-Line Utility (Wmic.exe)

Keywords: kbbug kbfix kbqfe kbwinxpsp2fix kbwinxppresp2fix kbwinserv2003presp1fix kbhotfixserver KB824223

-

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

© Microsoft Corporation. All rights reserved.