Loading...


bookmark - How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff

How To: Ip Configuration Script (win Xp) - If you travel a lot with your laptop, and need to switch between diff

 
 Discussion by jarro2002 with 0 Replies.
 Last Update: June 22, 2006, 9:04 pm
 
bookmark - How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff  
Quickly Post to How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff w/o signup Share Info about How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff using Facebook, Twitter etc. email your friend about How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

How To: IP Configuration Script (win XP)


If you travel a lot with your laptop, and need to switch between
different IP's in different locations, this script is for you.

There are many programs that handle this task very well,
but they cost sometimes pretty big money. This tutorial will show you how to
make your own IP Configuration Script for free.

This script is for a static ip address configuration and
is based on a little program called "NETSH.EXE" which is supplied with Windows.

How it works.


QUOTE


Microsoft Windows XP - Using Netsh

Netsh.exe is a command-line scripting utility that allows you to,
either locally or remotely, display or modify the network configuration of a computer
that is currently running. Netsh.exe also provides a scripting
feature that allows you to run a group of commands in batch mode
against a specified computer. Netsh.exe can also save a configuration
script in a text file for archival purposes or to help you configure other servers.


OK. Let's get down to the business.

First of all, will need to create a batch (.bat) file and a text file (.txt)
I will explain the contens of the text file later on.

1. In our batch file, wee will put the code as follows.

CODE


@echo off
netsh.exe exec textfile.txt
if not errorlevel 1 goto allok
echo.
echo ERROR !!!
echo.
pause
goto end

:allok
echo.
echo NETSH exec .......... OK!
echo.
:end


In the second line of our batch file wee execute NETSH.exe with a command-line parameter.
The command-line parameter is the path and name of our text file
(or just the name if both files will bee stored in the same directory)

In the next lines of the batch file is a simple error handler.


2. In our text file, wee will put the code as follows.

CODE


interface ip
set address name="Wireless" source=static addr=10.3.123.123 mask=255.255.0.0
set address name="Wireless" gateway=10.1.0.0 gwmetric=0
set dns name="Wireless" source=static addr=88.77.77.3
add dns name="Wireless" addr=163.29.251.110
add dns name="Wireless" addr=194.244.159.1
add dns name="Wireless" addr=195.130.20.131
set wins name="Wireless" source=static addr=none


The "interface ip" command branches to a submenu in the NETSH.exe program.
The "set address name" command configures the IP, the sub-net mask and the default gateway address.
The name "Wireless" is an example interface name, change it to the interface name you want to configure.
In the fourth and lower lines, the "addr" values are the IP addresses of your DNS servers.
In the last line, the "addr" value is the WINS server IP address.

NOTE: Remember to save the text file under the same name you have specifiedin the batch file,
and to save the batch file with the .BAT extention.


This is my first tutorial and i hope
it will be useful for someone.

   Thu Jun 22, 2006    Reply         

Quickly Post to How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff w/o signup Share Info about How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff using Facebook, Twitter etc. email your friend about How To: Ip Configuration Script (win Xp) If you travel a lot with your laptop, and need to switch between  diff Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Similar Topics:

Windows Xp Freezes At Welcome Scree...

today i start my pc in windows xp and found that xp freezes at welcome screen. then i try to boot in safe mode but the problem persisits then i again try in last good configuration setting but it doesn't help so i hav to reinstall my xp plz any body hav solution for this so that i do ...more

   14-Jul-2005    Reply         

Can 39 t Go To Router 39 s Config...

Hi People, I am working on a network camera. So, this camera needs to be in the same network with the client PC. As for the PC to be working with the camera in the same network, I use a router, Linksys WRT54G. In the first place, the PC ...more

   26-May-2008    Reply         

What Would You Rather Change In Win...

This is not a Win/Linux/Mac dispute, rather pointing out a few minor things that I find really annoying in Windows OS and I'd rather change if I had the chance/knowledge (disclaimer: I mainly refer to winxp but I've used almost all other versions, I have some experience with Linux and almost ...more

   08-Jul-2008    Reply         

How To Protect A Directory From Being Viewed without admin username and password   How To Protect A Directory From Being Viewed without admin username and password (4) (11) How To Make Image To Highlight When It`s Mouseovered   How To Make Image To Highlight When It`s Mouseovered