WINSCL

This handy tool lets you remove specific records from your WINS database and output WINS records to an ASCII file.

Mark Minasi

July 31, 1998

3 Min Read
ITPro Today logo in a gray background | ITPro Today

A command-line tool for controlling WINS servers

At two recent conferences, I gave a presentation that covers how WindowsInternet Naming Service (WINS) and Domain Name System (DNS) work. Attendees ofboth talks asked me, "How can I delete a specific record from a WINSdatabase?" and "How can I dump a complete list of WINS registrationsto an ASCII file?"

The graphical WINS manager that ships with NT can't perform either of thesejobs, but a utility called winscl.exe, which comes with Microsoft Windows NTServer 4.0 Resource Kit and Microsoft Windows NT Server 3.51 ResourceKit, can.
WINSCL offers much of the same functionality as thegraphical WINS manager, and it provides a few functions the GUI program doesn'toffer.

Despite its power, WINSCL can be frustrating. I'm not exaggerating when Isay that it makes Edlin's user interface (UI) look friendly. To start WINSCL,you type

winscl

on a command line, and the utility greets you with

TCP/IP or named pipe. Enter 1 for TCP/IP --

WINSCL is asking you to specify whether you want to enter an IP address orNetBIOS name to identify the WINS server you want to use WINSCL to control. Ifyou enter 1, WINSCL will ask for the server's IP address (such as my WINSserver's address, 10.10.10.21). If you enter 0, it'll ask for the machine'sUniform Naming Convention (UNC) name, which is your cue to enter the server'sname preceded by two backslashes (e.g., \WINS01).

After you select a server, WINSCL produces a description of each of its 31commands. By default, it lists all 31 commands after it completes every job. Ifyou enter the NOME (no menu) command, WINSCL won't display its menu of commandsagain until you exit and restart the utility. Another WINSCL quirk is that youmust capitalize all commands.

WINSCL Commands
WINSCL's two most useful commands are DN (delete name) and GRBV (get recordsby version numbers). DN helps you clean out a WINS database. GRBV lets you dumpall of a WINS server's records to an ASCII file.

Several months ago, someone registered with my WINS server as JOE<03>.I used WINSCL to remove Joe from the WINS database. My dialog with my WINSserver follows.

Command -- DN

Name? JOE

Do you want to input a 16 char (1 for yes) -- 1

16th char in hex -- 03

Scope -- 1 for yes -- 0

Status returned is (SUCCESS -- 0)

The other useful WINSCL command, GRBV, lets you extract WINS records forstorage in an ASCII file based on the records' version numbers, theMicrosoft term for the order in which they were created. (The first WINS recordthat a WINS database creates is version number X, the next record's versionnumber is X+1, and so on.) GRBV is convenient, but it doesn't give up the dataeasily. You get a bit of interrogation along the way, as the following dialogdemonstrates.

Command -- GRBV

Address of owner WINS? 10.10.10.21

Want to specify range -- (input 1) or all (default) -- 0

Use filter (1 for yes) -- 0

Put records in wins.rec file (1 for yes) -- 1

Status returned is (SUCCESS -- 0)

If this example looks like too much work, you can create an ASCII text fileto automatically answer WINSCL's questions. Enter one answer per line for theWINSCL dialog. For example:

1

10.10.10.21

GRBV

10.10.10.21

0

0

1

EX

EX is the command to exit WINSCL. Name your ASCII file WINSIN.TXT, andinvoke it by typing

WINSCL

The text dump process will run automatically.

Have fun playing with WINSCL, but don't bother trying to use the CR (countrecords) command. CR makes WINSCL crash every time.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like