1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[WANTED] Batch file to change IP

Discussion in 'Hire a Freelancer' started by jodyberry, Apr 15, 2010.

  1. jodyberry

    jodyberry Power Member

    Joined:
    May 21, 2009
    Messages:
    619
    Likes Received:
    170
    I'm looking for a .bat file to change my IP.

    My info:

    I have FIOS with Dynamic IPs. Running D-Link DI-604 router.

    I previously had Yury (from CLBotPro) make a script to work with his software, but it wasn't a batch file, it was some other way.

    I am now utilizing a new software that requires a batch file. Please PM me with any additional questions and price.

    Thanks...
     
  2. jesus3

    jesus3 Regular Member

    Joined:
    Jan 8, 2010
    Messages:
    277
    Likes Received:
    63
    Occupation:
    IM/Student
    Location:
    Home of the Haze!
    disconnect router. disconnect modem. wait 1 min. connect modem. wait for all lights to be stable. connect router. done.
     
    • Thanks Thanks x 1
  3. haverox

    haverox Regular Member

    Joined:
    Oct 6, 2009
    Messages:
    270
    Likes Received:
    144
    Occupation:
    Internet marketer/entrepenuer
    Location:
    The US Federal Reserve
    look at my profile and youll find a thread i started on this with your answer
    Posted via Mobile Device
     
    • Thanks Thanks x 1
  4. jodyberry

    jodyberry Power Member

    Joined:
    May 21, 2009
    Messages:
    619
    Likes Received:
    170

    Thanks, but I actually need it to be done ALL with the batch file. (not manually).


    Thanks, though.
     
  5. jodyberry

    jodyberry Power Member

    Joined:
    May 21, 2009
    Messages:
    619
    Likes Received:
    170

    Thanks. I tried the code, but it didn't work. I think because I am using JUST a router - no modem. It's Verizon FIOS that connects straight to my router from an ONT mounted outside my house.
     
  6. embersion

    embersion BANNED BANNED

    Joined:
    Jun 13, 2009
    Messages:
    430
    Likes Received:
    15
    for connecting and disconnecting

    rasdial "connection name" /d
    rasdial "connection name" username password

    I guess I already sent you it didn't I??
     
  7. jodyberry

    jodyberry Power Member

    Joined:
    May 21, 2009
    Messages:
    619
    Likes Received:
    170


    What would the "connection name" be? Would it be the web address that has the connect/disconnect buttons?

    re: rasdial http://192.168.1.1/st_devic.html /d
     
  8. unknwn

    unknwn BANNED BANNED

    Joined:
    Dec 19, 2009
    Messages:
    151
    Likes Received:
    59
    If you know the process i can make a quick bot for it.
     
  9. unknwn

    unknwn BANNED BANNED

    Joined:
    Dec 19, 2009
    Messages:
    151
    Likes Received:
    59
    ipconfig | find "IP Address" > tempip.txt
    set /p tvar=< tempip.txt

    :untilloop

    rasdial "connection name" /d
    rasdial "connection name" username password

    ipconfig | find "IP Address" > tempip.txt
    set /p newip=< tempip.txt
    if %tvar%==%newip% goto untilloop
     
  10. jodyberry

    jodyberry Power Member

    Joined:
    May 21, 2009
    Messages:
    619
    Likes Received:
    170


    So, I would make all this into a .bat file?

    I'm still not sure what the "connection name: would be.
     
    Last edited: Apr 15, 2010
  11. unknwn

    unknwn BANNED BANNED

    Joined:
    Dec 19, 2009
    Messages:
    151
    Likes Received:
    59
    Yes thats it.
     
  12. rudeprincess

    rudeprincess Junior Member

    Joined:
    Dec 5, 2009
    Messages:
    151
    Likes Received:
    92
    Give imacro a try. I made one up to change my ip a while back and it still works. It might not be as fast as a bat file, but it works for me.
     
  13. embersion

    embersion BANNED BANNED

    Joined:
    Jun 13, 2009
    Messages:
    430
    Likes Received:
    15
    can you tell me how do you connect your net??

    is it auto connect ?? mean when your pc startup then it's connect automaticsally??

    which modem do you have??

     
  14. bannedfree

    bannedfree Regular Member

    Joined:
    Jan 31, 2010
    Messages:
    444
    Likes Received:
    43
    Occupation:
    World Wide Web Worker
    Location:
    near an active volcano
    Step 1: Go to Notepad
    Step 2: type this code

    @echo on
    ipconfig/release
    ipconfig/flashdns
    ipconfig/renew


    Step 3: save the file where ever you like with a filename IPrefresh.bat take note save it in a .bat format.
    Step 4: Just click on the saved file to change IP.

    Hope this works for you. Cheers
     
  15. jesus3

    jesus3 Regular Member

    Joined:
    Jan 8, 2010
    Messages:
    277
    Likes Received:
    63
    Occupation:
    IM/Student
    Location:
    Home of the Haze!
    aint work for me good try though thanks
     
  16. zelma143

    zelma143 Power Member

    Joined:
    Jun 25, 2010
    Messages:
    571
    Likes Received:
    37
    Occupation:
    PHP programmer,Bot maker,iMacro script maker
    hey they won't work

    you must go through telnet It wont' work with dos

    so can't be done in batch file i guess
     
  17. nirmar

    nirmar Regular Member

    Joined:
    Jul 23, 2009
    Messages:
    285
    Likes Received:
    108
    @jodyberry,

    Line 1:
    get the path of your Rasdial.exe and change it with line 1, if needed.

    Line 2:
    -->Get your <internetconnection> from
    Start -> Settings -> Network Connection -> <internetconnection>

    --> /DISCONNECT must be typed in CAPS, otherwise it will not work.

    Line 3:
    --> Get the username and password to connect your internet from your internet providers. if it is direct connection leave it blank.

    So here are your three lines

    So for example if I have my internet connection named abc, and username - userN and password passN

    Then it will be

    cd c:\windows\system32
    Rasdial.exe abc /DISCONNECT
    Rasdial.exe abc userN passN

    open a notepad and type these 3 lines.
    and save it as Batch1.bat.


     
    Last edited: Jun 26, 2010
  18. Captainwtf

    Captainwtf Registered Member

    Joined:
    Feb 25, 2010
    Messages:
    53
    Likes Received:
    29
    Afaik, Batch programming doesn't have enough of a low-level access to the Operating System to change the IP Address. It does allow for the /flushdns, /ipconfig release etc... But you cannot specifically code it to change your IP.
     
  19. bannedfree

    bannedfree Regular Member

    Joined:
    Jan 31, 2010
    Messages:
    444
    Likes Received:
    43
    Occupation:
    World Wide Web Worker
    Location:
    near an active volcano
    his asking for batch file so i gave him a Dos base batch program. hehehe
     
  20. zelma143

    zelma143 Power Member

    Joined:
    Jun 25, 2010
    Messages:
    571
    Likes Received:
    37
    Occupation:
    PHP programmer,Bot maker,iMacro script maker

    he has D-Link DI-604 modem So can't do with batch programming I guess

    it will be done by talnet..

    like telnet 192.168.1.1 then enter
    admin
    pass then
    reboot

    so going through telnet can't access by batch

    this what I'm thinking about

    may be your right too but that's right way
     
    • Thanks Thanks x 1