Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Shortcut to TCP/IP Properties

Posted on 2005-04-01
Medium Priority
Last Modified: 2008-01-09
I'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.

Question by:bluebirds1984

Assisted Solution

jordi169 earned 700 total points
ID: 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.
LVL 11

Accepted Solution

bwalker1 earned 1300 total points
ID: 13682268
I created a shortcut to to my local area connection, placed the shortcut in the %systemroot%\windows\system32 directory and named the shortcut "net".  Now I can go to start->run, type in "net.lnk" and it opens the local area connection window.
LVL 86

Expert Comment

ID: 13683017
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

@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%]

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

set IP=
set NM=
set GW=
set DNS0=
set DNS1=
set WINS0=
set WINS1=
goto SetIP

set IP=
set NM=
set GW=
set DNS0=
set DNS1=
set WINS0=
set WINS1=
goto SetIP

:: **********************************************************************
goto leave
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

echo Error: Label "[%Location%]" not defined.


Author Comment

ID: 13707418
i'm at work so i wont be creating any scripts, thanks anyway.

the shortest path is probably creating the system32 shortcut, thanks.

Expert Comment

ID: 21669063
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.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of:,,, …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question