Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP address

Status
Not open for further replies.

kendas

Technical User
Joined
Feb 2, 2004
Messages
108
Location
SG
Hi,
how can i make use of vbscript to release and renew IP address?
thanks
 
Hello kendas,

I would do this?
Code:
set wshshell=createobject("wscript.shell")
wshshell.run "ipconfig /release_all",,true
wshshell.run "ipconfig /renew_all"
set wshshell=nothing
regards - tsuji
 
kendas,

Just be careful if you are executing the code above remotely. Unless you copy and execute this script directly on the PC, there is a very high likelyhood that it won't complete. Once the release is compleated you will loose all network connectivity.

Use PSEXEC from Sysinternals to copy and remotely execute the script.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top