Re: Change IP configuration with just run a file

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Steve Winograd [MVP] (winograd_at_pobox.com)
Date: 07/24/04


Date: Sat, 24 Jul 2004 02:00:48 -0600

In article <321c01c4714f$9f761e90$a601280a@phx.gbl>, "July"
<anonymous@discussions.microsoft.com> wrote:
>Hello, I want to change the IP configuration on a Windows
>XP Professional PC or notebook with just run a file, is
>there any way to achieve that? All advice are welcome.

Use the "netsh" command in a batch file. To change a static IP
configuration, the command is:

   netsh interface ip set address <connection> static <ip> <mask>
        <gateway> <gateway metric>

For example:

  netsh interface ip set address "Local Area Connection" static
      192.168.0.100 255.255.255.0 192.168.0.254 10

  netsh interface ip set address "Wireless Connection" static
      10.20.30.100 255.0.0.0 10.20.30.254 10

This Microsoft Knowledge Base article has details of the Windows 2000
version of netsh. I don't know how much of it applies to Windows XP:

How to Use the Netsh.exe Tool and Command-Line Switches
http://support.microsoft.com/?id=242468

To run the program, type this at a command prompt:

   netsh

Then type "?" or "help" for a list of commands. For information on a
command, type the command name followed by "?" or "help". For example:

   diag ?
   routing help

-- 
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)
Please post any reply as a follow-up message in the news group
for everyone to see.  I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.
Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com


Relevant Pages

  • RE: re-setting boot partition
    ... Description of the Windows 2000 Recovery Console ... For a Microsoft Windows XP version of this article, ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.setup_upgrade)
  • RE: Win2000 Upgrade to SP3 Express Setup error.
    ... Start your computer with the Windows Setup floppy disks, ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ... you cannot copy a file from the local hard disk to a floppy disk. ...
    (microsoft.public.win2000.setup_upgrade)
  • RE: Locating corrupt driver
    ... This article describes the functionality and limitations of the Windows ... Create and format partitions on drives. ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.applications)
  • >>>> NET SEND <<<<
    ... Windows Xp Net Send ... Net Send Command For Mac ... Net Send Syntax Dos ... Dos Net Send Commands ...
    (sci.lang.japan)
  • Re: DOS Box Keyboard problem
    ... mode con codepage select=860 ... This is copied from a command prompt, I did not type a single character, all ... into) Command Prompt windows with a mouse. ... I get 437 from command chcp and cmd chcp. ...
    (microsoft.public.windowsxp.configuration_manage)