IPCfg plugin for Take Command / TCC / TCC/LE

beta version 0.95.2     2024-01-05

Charles Dye

Purpose:

This plugin adds one command, IPCFG, to display information about IP network adapters.

Installation:

To use this plugin, copy IPCfg.dll to some known location on your hard drive. (If you are still using the 32-bit version of Take Command, take IPCfg-x86.dll instead of IPCfg.dll.) Load the .DLL file with a PLUGIN /L command, for example:

plugin /l c:\bin\tcmd\test\ipcfg.dll

If you copy these files to a subdirectory named PlugIns within your Take Command program directory, the plugin will be loaded automatically when TCC starts.

Plugin Features:

New command: IPCFG

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

New Command:

IPCFG — Display IP interface information.

Syntax:
IPCFG /A /B /D /I /L /P /Q /R /S /T /U /X wildmask

/A or /ALLshow detailed information about all adapters; short for /I /L /T /U
/B or /BOUNCErelease and then renew IPv4 addresses; short for /X /R
/Ddisable highlight
/Ishow more detailed information
/Linclude loopback adapters
/Ppage output
/Qquietly (affects /B /R and /X)
/R or /RENEWrenew IPv4 addresses
/Smake sounds (affects /B /R and /X)
/Tinclude tunnel adapters
/Uinclude adapters with media disconnected
/X or /RELEASErelease IPv4 addresses
wildmaskonly adapters with matching ‘friendly’ names will be included

This command displays information about IP network adapters. It can also be used to release or refresh IPv4 addresses.

Options may begin with either a hyphen or a forward slash, and case is not significant. /X, /RELEASE, -x, and -release all work the same.


Wildmask, if specified, filters the adapters to list or release/renew. TCC wildcards are supported; the adapter’s ‘friendly’ name must match.


/X or /RELEASE releases any IPv4 addresses which have been assigned to the adapter by DHCP. Note that this option only releases IPv4 addresses. IPv6 is not supported (API limitation).

/R or /RENEW renews any IPv4 addresses which have been assigned to the adapter by DHCP. Note that this option only renews IPv4 addresses. IPv6 is not supported (API limitation).

/B or /BOUNCE releases and then renews IPv4 addresses. It’s equivalent to /X /R.


/Q suppresses the error-or-failure lines which are displayed when releasing or renewing an IP address.

/S causes IPCFG to play sounds when releasing or renewing IP addresses. The “system asterisk” sound is played if the operation succeeds, and the “critical stop” sound indicates an error.


/D disables the highlight. You can also set an environment variable Highlight:

rem   Disable highlight:
set highlight=none

rem   Set the highlight foreground:
set highlight=bright cyan

rem   Set both foreground and background:
set highlight=bri whi on blu

rem   Numbers are okay too:
set highlight=46

If the Highlight environment variable is not defined, the plugin will check the registry for a value named Highlight of type REG_SZ. The plugin will search, in this order:


/P pauses output after every screenful.


ipcfg /a /p



Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

Status and Licensing:

Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.

IPCfg is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.

Download:

You can download the current version of the plugin from http://charlesdye.net/dl/ipcfg.zip.