Jump to content

Recommended Posts

Posted

what would be the shortest and unseen by the user way to do that? is there a dos function to disconnect from some network maybe?

Posted

You can use the 'DevCon' utility from Microsoft. It is a command line device manager. You can disable the network device to disconnect and then when you need to reconnect just re-enable it.

*** Matt @ MPCS

Posted

the reason i do this it to get a new ip, would disabling the network device also disconnect from the isp so when i connect it i will get a new one?

Posted

This will disconnect, but there is no way to ensure getting a new IP address. DHCP pulls the IP addresses from a pool and if the one you had before you disconnected isn't taken then it is likely you will get the same one again.

A way to release your current IP and get a new one (not necisarily not the same one) is to use ipconfig in winxp/2k. This will make it so you don't have to include the 3rd party application.

*** Matt @ MPCS

Posted

so u say i can get a new ip with ipconfig? or just check if its not like the older one

it hasnt happend yet that i got the same ip after disconnecting so i dont care if its such a low %

Posted

Yes, ipconfig can release your current ip and get a new one. Read the command line parameters to figure out how. I think there is also a script in the Scripts and Scraps section that shows this used in a script, do a search if you need help with it.

*** Matt @ MPCS

Posted

If you want help with it you will have to at least tell me what the error is. I also suggest looking at ipconfig /release this will get rid of the ip you currently have so renew can get a new one.

*** Matt @ MPCS

  • Developers
Posted (edited)

i now saw the ipconfig /renew but i dont know where to see the adapter name as if i dont put any i get an error

<{POST_SNAPBACK}>

ipconfig /all will show all current nic names and ip addresses...

edit: but i am not sure if an Ipconfig command will renew the IPaddress on a RAS connection

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

I am assuming that we are not talking about dialup as magaf said:

disconnect from some network

All of this is assuming you are on a ethernet network.

*** Matt @ MPCS

Posted (edited)

when i do renew or release on the adapter i get an error that dhcp is disabled

im on adsl which is high speed internet

Edited by magaf
Posted

What kind of internet connection are you using? Is your IP address statically assigned, or do you use DHCP? These are all considerations you should have taken into account before asking the initial question.

*** Matt @ MPCS

Posted (edited)

im on adsl, when i disconnect im getting a new ip, i dont know what DHCP is

so i should use the first way?

Edited by magaf
Posted

Dynamic Host Configuration Protocol, it issues your computer internet configuration information so it can connect to the network.

Issue a ipconfig /all from the command line and under the adapter you are working with look for a line that looks like:

Dhcp Enabled. . . . . . . . . . . : Yes

If it says no instead of yes then you dont have dchp enabled. If you don't knowwhere to look just copy and paste your /all in here and I will read through it for you (you can bleep out any PC specific information).

*** Matt @ MPCS

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...