I created a shortcut to to my local area connection, placed the shortcut in the %systemroot%\windows\syste
Main Topics
Browse All TopicsI'm sick of the constant clicking I have to do to get to the TCP/IP properties, as I change my IP a lot when configureing equiptment.
is there a shortcut i can type in RUN to get to it?
for example to get to Calculator you can type calc and command you type cmd.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You can use this script; put it someplace into the path, then call it with the location as argument (or create some shortcuts with the proper arguments).
Just specify the name of the connection to configure, and add locations like the sample locations you find.
To switch between the different settings, simply add the location label without the square brackets as argument; examples:
setip dhcp
setip loc1
setip loc2
====8<----[SetIP.cmd]----
@echo off
setlocal enabledelayedexpansion
:: *** name of the IP connection to configure:
set LAN=LAN Connection
set LogFile=%~dpn0.log
if exist "%LogFile%" del "%LogFile%"
set Location=%1
set Location=%Location:/=%
type %~dpnx0 | find /i ":[%Location%]" >NUL
if errorlevel 1 goto err_Label
goto [%Location%]
:[DHCP]
echo Setting IP address to DHCP ...
netsh interface ip set address name="%LAN%" source=DHCP >>"%LogFile%"
echo Setting DNS address to DHCP ...
netsh interface ip set dns name="%LAN%" source=DHCP >>"%LogFile%"
echo Setting WINS address to DHCP ...
netsh interface ip set wins name="%LAN%" source=DHCP >>"%LogFile%"
echo OK.
goto :eof
:[Loc1]
set IP=192.168.0.10
set NM=255.255.255.0
set GW=192.168.0.1
set DNS0=192.168.0.1
set DNS1=192.168.0.1
set WINS0=192.168.0.1
set WINS1=192.168.0.1
goto SetIP
:[Loc2]
set IP=192.168.1.10
set NM=255.255.255.0
set GW=192.168.1.1
set DNS0=192.168.1.1
set DNS1=192.168.1.1
set WINS0=192.168.1.1
set WINS1=192.168.1.1
goto SetIP
:: **************************
goto leave
:SetIP
echo Setting IP address %IP% ...
netsh interface ip set address "%LAN%" static %IP% %NM% %GW% 1 >>"%LogFile%"
echo Setting primary DNS server %DNS0% ...
netsh interface ip set dns "%LAN%" static %DNS0% >>"%LogFile%"
for %%a in (1 2 3 4 5 6 7 8 9) do (
if not "!DNS%%a!"=="" (
echo Adding DNS server !DNS%%a! ...
netsh interface ip add dns "%LAN%" !DNS%%a! >>"%LogFile%"
)
)
echo Setting primary WINS server %WINS0% ...
netsh interface ip set wins "%LAN%" static %WINS0% >>"%LogFile%"
for %%a in (1 2 3 4 5 6 7 8 9) do (
if not "!WINS%%a!"=="" (
echo Adding WINS server !WINS%%a! ...
netsh interface ip add wins "%LAN%" !WINS%%a! >>"%LogFile%"
)
)
echo OK.
goto :eof
:err_Label
echo.
echo Error: Label "[%Location%]" not defined.
pause
echo.
:leave
====8<----[SetIP.cmd]----
I found your script above oBdA interesting and I am thinking to give it a shot.
Thought the only problem I have with it is that I have a range of 15 IP addresses and would like the script to increment by the last digit of the IP address by +, every time I run the script.
Is this something possible?
Let me know thanks.
Business Accounts
Answer for Membership
by: jordi169Posted on 2005-04-01 at 07:30:28ID: 13681606
it's not that easy for this one. most of your commands that you type in like: calc and ipconfig, are executables located in your system 32 folder. If you can find the executable that runs the tcp/ip configuration you're golden. I looked at the system32 briefly but found nothing.