Link to home
Start Free TrialLog in
Avatar of bertchen
bertchen

asked on

Script to change IP

I have a WINNT Wkst, I wanna write a script to change the TCP/IP settings and MS Outlook settings, how do I achieve this ?

TQ.
Avatar of carbins
carbins

Most of the settings you will care about are stored in the registry. Where this is the case, the basic form of your solution is to create an appropriate *.reg file with the desired settings, and use the command line 'regedit <file>.reg' to import these settings to the registry.

The easiest way to build this .reg file is to export the desired settings from another registry.

To create custom REG files, you'll need some intelligent scripting tool (PERL, VBScript, awk - grep - sed, etc).

Brenton Carbins
Blueprint Consulting

Avatar of bertchen

ASKER

I have search thru the entire registry for Windows NT Workstation, what I could find is only DNS entries, no IP, Gateway, subnet mask or broadcast address is there.

Please advise further.

many thanks.


Avatar of Tim Holman
Look here :

http://www.winternet.com/~sparks/IPChange/IPChange.html

A nice GUI which does similar things is at www.netswitcher.com.

The TCP/IP related registry keys it sounds like you are interested in are related to the particular Network Adapter installed and found in the HKLM\System\CurrentControlSet\Services\<"NETADAPTER">\Parameters\TCPIP\
You'll see DefaultGateway and IPAddress under there. To determine which key to find <"NETADAPTER">, look under HKLM\System\CurrentControlSet\Services\NetBT\Adapters. Once you know where they are, now you can use any Registry editing tool (or even .reg files like mentioned in earlier comments) in a script.

Not sure what Outlook settings you are looking to change.
Are you still waiting for an answer? You can write a script to edit registry entries for the settings you wish to change... you haven't mentioned which outlook settings...
ASKER CERTIFIED SOLUTION
Avatar of smu95rp
smu95rp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any update ?
Thanks all.