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

x
?
Solved

Shortcut to TCP/IP Properties

Posted on 2005-04-01
5
Medium Priority
?
4,336 Views
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.

0
Comment
Question by:bluebirds1984
5 Comments
 
LVL 2

Assisted Solution

by:jordi169
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.
0
 
LVL 11

Accepted Solution

by:
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.
0
 
LVL 86

Expert Comment

by:oBdA
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

====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]----
0
 
LVL 4

Author Comment

by:bluebirds1984
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.
0
 

Expert Comment

by:CarloVasquez
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.
0

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: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
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