Discussion Locked

Command prompt to modify IP settings

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a Windows NT4 server that I need to be able to modify TCP/IP settings via the command prompt. Primarily I need to modify the DNS entries for one specific network card in the server. I know that this can be done via the command prompt, im just not really sure what the command(s) would be. Could someone please help me our or point me in the right direction?

7 replies

by ewing bettles

Actually, I beleive that you will require more than the builtin command-line tools available with NT4. The TCP/IP settings for a network adapter are actually stored within the NT registry. IPCONFIG will return a NON-editable view of those settings. There are some Resource Kit tools that you could use in combination to build a command-line script(s) that would:

1-Dump a portion of the registry contents to STDOUT (redirected to a file). This could be done with REGDMP.EXE. REGDMP.EXE output format coincides with REGINI.EXE input format.

2-Carefully modifying the file to change the DNS values, it could then be used with REGINI.EXE to change the actual registry entries.

This is NOT for the faint of heart. Modifying the Registry incorrectly can cause a system to be unstable or completely unusable. I'm sure that there are other methods that might work (a vbscript, javascript or perlscript with Windows Script Host installed for instance, or other command line tools altogether)but any method will end up making registry modifications. If you know the particular registry value and its exact location for you particular adapter, you could just create a .REG text file to use with the builtin REGEDIT.EXE, but searching or querying for the information and its location will require some addon tools.

Good luck in your efforts, -Ewing

by ntoz

Connect to the system using regedt32.exe from a remote NT system with permissions on that server, go to the key and modify the DNS entry. regedt32.exe should give you all that you need to make the change remotely. Or use regedit.exe for that matter.If I guessing correctly, this is a one time change.

This discussion is closed to new replies.