nWOLc.exe is a console command for nWOL. You can send magic packets, check host status, and wait for a host to boot up using this command.
It is bundled with the nWOL package, and when you use installer, it will be placed in the same folder as nWOL (C:\Program Files\nWOL).
This command can be manually executed from command prompt window, and also can be executed from a batch file or task scheduler.
Options of nWOLc.exe are as follows.
nWOLc: nWOL console command (Version 1.7.72) -l ["regex"] List all or regex-matched hosts -f ["regex"] List all or regex-matched hosts with full information -a Send magic packet to all WOL-capable hosts -h hostnames... Send magic packet to specified WOL-capable hosts -r "regex" Send magic packet to regex-matched WOL-capable hosts -m mac [ip [mask]] Send magic packet -p hostname Check status of a host(or IP) (retcode=0 when online) -w hostname [waitsec] Wait for a host(or IP) to come online (retcode=0 when online) -t sec Set ping timeout in seconds for -p or -w (default=1) -u port Specify destination UDP port number of Magic Packet -i Ignore case when -l, -f or -r -c filename Configuration file name(Absolute path or User name) -o filename Redirect console output to a file(Absolute path) -v Verbose mode -n No output messages -? Help
List hosts registered in nWOL.
Example | Description |
---|---|
nwolc -l |
List all hosts registered in nWOL. |
nwolc -l "^a.*z$" |
List hosts which match the regex. (ex. bigins with 'a' and ends with 'z') |
nwolc -l server -i |
List hosts which match the regex. (ex. contains the string 'server' ignoring case) |
Same as -l, except detailed information of each host will be shown.
Send magic packets to all WOL-capable hosts registered in nWOL.
Example | Description |
---|---|
nwolc -a |
Send magic packets to all WOL-capable hosts registered in nWOL. |
Send magic packet to specified WOL-capable hosts registered in nWOL.
Example | Description |
---|---|
nwolc -h Server1 "File Server" |
Send magic packet to Server1 and "File Server" |
Send magic packet to specified WOL-capable and regex-matched hosts registered in nWOL.
Example | Description |
---|---|
nwolc -r ^[0-9] |
Send magic packet to all hosts which names start with decimal digit. |
nwolc -r PC$ -i |
Send magic packet to all hosts which names end with "PC", ignoring case. |
Send magic packet to specified MAC address with optional IP address and netmask.
Example | Description |
---|---|
nwolc -m abcdef123456 |
Send magic packet to the host(MAC address: abcdef123456) which is in the same LAN. |
nwolc -m abcdef123456 192.168.1.20 |
Send magic packet to the host(MAC address: abcdef123456, IP address:192.168.1.20) which is in the same LAN. |
nwolc -m abcdef123456 192.168.10.20 255.255.255.0 nwolc -m abcdef123456 192.168.10.20 24 nwolc -m abcdef123456 192.168.10.20/24 |
Send magic packet to the host(MAC address: abcdef123456, IP address:192.168.1.20, Netmask:/24). |
nwolc -m abcdef123456 192.168.10.255 |
Send magic packet to the host(MAC address: abcdef123456). Destination IP address of the magic packet is 192.168.10.255 which is a "directed broadcast address" of the remote host. |
nwolc -m abcdef123456 mypc.mydomain.com |
Send magic packet to mypc.mydomain.com. The name will be resolved by DNS. |
nwolc -m abcdef123456 mypc.mydomain.com 24 |
Send magic packet to mypc.mydomain.com. The name will be resolved by DNS, and 24 bit netmask will be applied for the destination IP address. |
Check the status of a host by sending ping packet.
Example | Description |
---|---|
nwolc -p Server1 |
Check the status of Server1 |
nwolc -p 192.168.1.6 |
Check the status of the host which address is 192.168.1.6. |
nwolc -p mypc.mydomain.com |
Check the status of the host of mypc.mydomain.com. |
nwolc -p Server1 -t 3 |
Check the status of Server1 with 3 seconds ping timeout. |
Notes: In the case of the Windows ping command, the return value is 0 (normal) even if the destination is unreachable (no route to the destination address). On the other hand, nwolc -p returns 1 in all cases except when it received the response from the host successfully.
Wait until a host becomes online. This command will repeatedly send ping to the host until a successful response is received. If waitsec is specified, the command exits when the host does not become online for waitsec seconds. If waitsec is not specified, the command never terminate.
Example | Description |
---|---|
nwolc -w Server1 60 |
Wait until Server1 becomes online maximum 60 seconds. |
nwolc -w Server1 |
Wait until Server1 becomes online with no time out. |
nwolc -w 192.168.1.6 60 |
Wait until the host 192.168.1.6 becomes online maximum 60 seconds. |
nwolc -w 192.168.1.6 60 -t 3 |
Wait until the host 192.168.1.6 becomes online maximum 60 seconds, setting 3 seconds timeout for ping. |
nwolc -w mypc.mydomain.com 60 |
Wait until mypc.mydomain.com becomes online maximum 60 seconds. |
nwolc -h Server1 -w Server1 60 |
Send magic packet to Server1, then wait until Server1 becomes online maximum 60 seconds. |
nwolc -a -w Server1 |
Send magic packet to all WOL-capable hosts, then wait until Server1 becomes online with no time out. |
Set timeout seconds for ping. This has to be used with -p or -w.
Example | Description |
---|---|
nwolc -p Server1 -t 3 |
Check the status of Server1 with 3 seconds timeout for ping. |
This option specify the destination UDP port number when sending magic packets. This option can be used with -a, -h, -r, or -m.
Example | Description |
---|---|
nwolc -a -u 7000 |
Send Magic Packet to all hosts registered in nWOL (except WOL Mode=Dsiable) with destination UDP port 7000. -u option overrides nWOL conifguration settings. |
nwolc -h Server1 -u 7000 |
Send Magic Packet to Server1 UDP port 7000. -u option overrides nWOL conifguration settings. |
nwolc -m abcdef123456 192.168.10.20/24 -u 7000 |
Send Magic Packet to UDP port 7000. |
nwolc -m abcdef123456 mypc.mydomain.com 24 -u 7000 |
Send Magic Packet to UDP port 7000. |
Use case-insensitive for regular expression matching. This option is used with -l, -f or -r.
Specify the nWOL configuration file. This has to be an absolute path for the file or just user name.
When user name is specified, the path will be C:\Users\<user name>\AppData\Roaming\nWOL\nWOL.conf .
Specified file must have a right permission.
Example | Description |
---|---|
nwolc -c "c:\Users\My Name\AppData\ Roaming\nWOL\nWOL.conf" -l |
Load specified file as a nWOL configuration file, then run -l. |
nwolc -c "User Name" -l |
Load the "User Name"'s nWOL configuration file, then run -l. |
Redirect console output to a file. filename has to be an absolute path. If the file exists, output will be appended to the file.
Example | Description |
---|---|
nwolc -o "c:\Windows\Temp\out.log" -l |
Run -l. console output will be appended to the specified file. |
Generate more detailed messages.
Do not generate any console output.
Show help, brief explanations of nWOLc options. The same message can be shown when executing nWOLc with no option.
Basically, nWOLc returns 0, when normal. Otherwise, when any Error messages occured, nWOLc returns 1.
In case of -p -w, nWOL returns 0 if the host becomes online, otherwise, returns 1.
In the case -w is used with one of -a, -h or -r, nWOLc returns the return value of -w, even if there's any error messages during the process of sending magic packet.
nWOLc.exe basically depends on the configurations of nWOL. However, -m, -p and -w can be used without nWOL configuration. You can run nWOLc with -m -p or -w independently from nWOL.
Please refer to the page below for the specification of the regular expression used in nWOL and nWOLc.
Related Articles
管理者より個人的に返信をご希望の方は、コメント中に必ずメールアドレスを記載してください。記載がないと返信できませんのでご注意ください。
If you want personal response from the author, please do not forget to write your email address in the comment. Otherwise, the author can not reply.
投稿されたコメントは手動で処理されるため、記事として登録されるまで1日程度かかります。
Submitted comments will be processed manually. So, please understand it will take about a day to publish your comment.