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

Article translations Article translations
Article ID: 824223 - View products that this article applies to.
Expand all | Collapse all

On This Page

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.

RESOLUTION

Windows XP

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

Hotfix information

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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Wmic.exe5.1.2600.1251329,72824-Jul-200303:24x86

Windows Server 2003

Hotfix information

A supported hotfix is 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 software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if 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. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

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
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Wmic.exe5.1.3603.0346,62424-Jul -200303:54x86
Windows Server 2003, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Wmic.exe5.1.3603.01,084,41624- Jul-200300:55IA-64

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" 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|milliseconds}
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)

Properties

Article ID: 824223 - Last Review: November 4, 2007 - Revision: 8.10
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
Keywords: 
kbautohotfix kbhotfixserver kbwinxpsp2fix kbwinxppresp2fix kbbug kbfix kbqfe kbwinserv2003presp1fix KB824223

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com