General discussion

Locked

Batch file to renew the ip from dhcp

By Navjun ·
I need a batch file that can renew my ip address from the DHCP server with administrator rights under windows 2000(i do have the user name and password of the administrator account).

And do u know if i can use this as a log on script?

thank you

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Batch file to renew the ip from dhcp

by Stillatit In reply to Batch file to renew the i ...

The command is

ipconfig /renew

to renew the lease on all adaptors. If you only want to renew one adaptor, called, for example, foo, then use

ipconfig /renew foo


You can put the command in a batch file or run it from an icon. You do not need admin rights to do it.

By the way, why do it at all? The DHCP client in your machine will automagically try a renew when the lease is 1/2 gone, and if that fails, try again more frequently until it succeeds.

Good luck.

Collapse -

Batch file to renew the ip from dhcp

by Navjun In reply to Batch file to renew the i ...

Poster rated this answer

Collapse -

Batch file to renew the ip from dhcp

by Mackem In reply to Batch file to renew the i ...

Why do you need to renew your ip address. It will will renew automatically as long as you log on regularly. Usually it will loose the address after a period of time, say 3 days.
If you need to keep the ip address then set up a static ip address with subnet and gateways dns etc.
hope this helps

Collapse -

Batch file to renew the ip from dhcp

by Navjun In reply to Batch file to renew the i ...

I need to do that b/c i have a problem with routher and internet provider.
and the way to fix it is to renew the IP address
i don't know how to write a batch file so if some one would write me one it would be nice
and i need it with admin rights
since under windows 2000 you can't renew the ip address unless u have some rights

thanks

Collapse -

Batch file to renew the ip from dhcp

by Navjun In reply to Batch file to renew the i ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Forums