Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Command Live Instruction to change IP Address - Windows 7

Posted on 2013-11-12
2
Medium Priority
?
511 Views
Last Modified: 2013-11-12
Say,

I wish to change the gateway of my Windows 7 PC using command line instruction. From time to time i need to choose a different router and keep looking for quick & simple ways to achieve this - how can i do it?

TX
0
Comment
Question by:shaunwingin
2 Comments
 
LVL 85

Expert Comment

by:oBdA
ID: 39643820
You can do that with netsh.exe (see http://technet.microsoft.com/en-us/library/bb490943.aspx); replace "Ethernet" with the name of the card you want to configzure, and 1.2.3.4 obviously with your gateway address:
netsh.exe interface ip set address name="Ethernet" gateway=1.2.3.4

Open in new window

0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 2000 total points
ID: 39643834
Or for temporary changes I would normally change the routing table and keep your gateway the same:

route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 X.X.X.X

Use this to see the results:

route print

That will need to be run as admin, e.g. a quick batch file:

@echo off
route print | find " 0.0.0.0"
Set Gateway=1.2.3.4
set /p Gateway=Enter new gateway - press return for %gateway%:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 %gateway%

Steve
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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses

916 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