Windows 7 / Getting Started

Using the WaitFor Utility

The WaitFor utility enables communication between processes. You can send a signal from one application to another. In fact, you can use this feature for signaling between batch files. When using this utility, you start the receiving application first and tell it to wait for the signal. The sender then sends the signal when it's ready. This command uses the following syntax:

Sender Syntax:
WAITFOR [/S system [/U [domain\]user [/P [password]]]] /SI signal

Receiver Syntax:
WAITFOR [/T timeout] signal

The following list describes each of the command line arguments.

/S system Specifies the remote system that you want to check. In most cases, you'll also need to supply the /U and the /P command line switches when using this switch.

/U [domain\]user Specifies the username on the remote system. This name may not match the username on the local system. You'll need to supply a domain name when working with a domain controller.

/P [password] Specifies the password for the given user. You can provide the command line switch without specifying the password on the command line in clear text. The system prompts you for the password. Using this feature can help you maintain the security of passwords used on your system.

/SI Sends the requested signal across the network.

signal Specifies the signal to send or receive. The signal is a simple string value such as StartSetup. A system can wait for multiple unique signals. The maximum signal name length is 255 characters. You may use a-z, A-Z, 0-9, and any ASCII character code in the range 128-255 for the string value. The string value can't contain special characters or spaces.

/T timeout Defines the amount of time to wait for the signal. You can specify any value from 1 to 99,999 seconds. The default setting waits an infinite amount of time.

[Previous] [Contents]