Need to change TCP/IP address easily and quickly for end users

By scromer ·
We are passing out laptops to our end users and need the ability to set ip addresses very easily as they go from remote office to remote office that requires static ip address. Is there a script, a batch job or software that could do something like that?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

First thoughts...

by tintoman In reply to Need to change TCP/IP add ...

I guess this is possible by setting a different hardware profile for each location however it seems like there is software that does it....this might help...

Collapse -

Batch file code for IP Address Change

by joanne.e.m In reply to Need to change TCP/IP add ...

Try the code below as a .bat file. Of course, put in your own ip address ranges for the variables (e.g. varip, varsm). ALSO, my "Local Area Connection" was actually called "NIC"; to check simply go to "Control Panel > Network Connections" and check what the connection you wish to use is called and substitute in place of "Local Area Connection"



set varip=
set varsm=
set vargw=
set vardns1=
set vardms2=

ECHO Changing IP Address Settings
ECHO Setting IP Address and Subnet Mask
netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%

ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1

ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%

ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%

ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcu\software\microsoft\internet explorer\main" /v "Start Page" /f/d "%varhome%"

ECHO Here are the new settings for %computername%:
netsh int ip show config


Related Discussions

Related Forums