1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

DOS Command 4 changing IP (Please Help)

Discussion in 'DOS/Other' started by Duckman69, Jul 6, 2007.

Thread Status:
Not open for further replies.
  1. Duckman69

    Duckman69 Thread Starter

    Jun 26, 2007
    Does any1 rember the dos command for changing your ip threw command prompt, thank you for your help in advance it is much appricated...
  2. ghostdog74


    Dec 7, 2005
    here's an example vbscript
    Set Adapters=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2").ExecQuery("select * from Win32_NetworkAdapterConfiguration where IPEnabled=true")
    IPArray = Array("")
    MaskArray = Array("")
    GatewayArray = Array("")
    GatewayMetric = Array(1)
    For each NIC in Adapters
       NIC.EnableStatic IPArray, MaskArray
       NIC.SetGateways GatewayArray, Gatewaymetric
  3. ViprXX


    May 12, 2007
    do you mean type ipconfig /release and press Enter. Then, type ipconfig /renew in command prompt?
  4. JohnWill

    JohnWill Retired Moderator

    Oct 19, 2002
    Depending on what you're connected to, you can't simply change your IP address. Perhaps if you told us what you are doing, and what environment you're in, that would help.
  5. ChuckE


    Aug 30, 2004
    If you are getting your IP address from an ISP (Internet Service Provider) you can't change what they assign you. Your IP address is whatever they, usually, dynamically assign you. Meaning, that while your IP address may be the same, from day to day, since they usually use their same assignments from day to day; there is nothing to stop them from changing it on you. That is, UNLESS you are paying more for a fixed IP address, and in that case, you still can't change it.

    It you have a home router, and your computer is getting a dynamic address from it, then while you can release the current address and then renew the IP address. The chances are that your home router will give you the same address again, unless you happen to have other devices grabbing dynamic addresses in-between the time you've released and then renewed.

    Now, if you do have a home router, and you want to define your own IP address (making it static) you probably can do so (depends upon your router). But to do so, you will still be limited to a range of addresses that your home router can used, most probably in the 192.168.*.* range.

    To set your computer to a static address is not done normally from a command line. But, I would not rule out some more elaborate command line calling up some clever registry change file.

    To change a computer's static IP address would typically be done by changing your defined Network Connections, Local Area Connection Properties.
  6. Duckman69

    Duckman69 Thread Starter

    Jun 26, 2007
    Thanks for the vb script ill have to give it a go later this week & sorry about not having the information at the end of my posts im going to update that soon... im not on my regular computer thats getting fixed by gateway at the moment... shot my mo bo to hell

    also thanks for the reply again chucke, with what you said lets say i wanted to change the ip manually the way you mentioned by going to tcp/ip settings & then properties i can assign a static ip ...

    if i assign an ip i need to use the ISP range and then i can make the rest up myself... so if i set that up properly, what do i do with the preferred DNS & secondary DNS i havent done this in awhile i left them blank when i tried the 1st time and it wouldnt work no connection to internet... so if you know what i should do for the dns feild i would appricate it thanks...
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/592694

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice