Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script to run ipconfig commands

Posted on 2004-03-24
15
Medium Priority
?
1,875 Views
Last Modified: 2008-01-09
I wondering if anyone can give me the syntax for writing a batch file or simple executable to run:
ipconfig /release
ipconfig /renew

I tried creating a batch file containing exactly that, and what happens is the cmd windows show on the desktop and it seems to be in a loop in the release. It looks like it just keeps trying to run release over and over and the only way to stop it is to close the cms window. Not to mention IP is never released.

Please advise.
0
Comment
Question by:smoore6857
  • 6
  • 4
  • 3
  • +2
15 Comments
 
LVL 32

Accepted Solution

by:
LucF earned 200 total points
ID: 10669744
Hi smoore6857,

I'm just guessing you named the script "ipconfig.bat"
Just change the name.

Greetings,

LucF
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 10669776
MMMmm good call Luc, as theres nothing wrong with your syntax :)
0
 
LVL 32

Expert Comment

by:LucF
ID: 10669810
I did the same thing yesterday with a tracert script... so I learn from my mistakes :)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 57

Expert Comment

by:Pete Long
ID: 10669835
:)
0
 
LVL 2

Expert Comment

by:tomar31
ID: 10669913
if you were to type in the command one at a time atthe dos prompt  does it still seem to be in a loop?

check your network connection to make sure that you are using DHCP

0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10669923
Wouldn't think .bat would have anything to do with it.
If you're script is called IPRefresh.cmd or .bat - this should work.

Why don't you try redirecting the output?
ipconfig /release >> c:\results.txt

Let it run for a bit and then post results.txt
0
 

Author Comment

by:smoore6857
ID: 10670325
LucF: That did the trick...I would have never thought of that!

Thanks!!
0
 
LVL 32

Expert Comment

by:LucF
ID: 10670340
You're very welcome ;-)

LucF
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 10670381
good call Luc
0
 
LVL 32

Expert Comment

by:LucF
ID: 10670425
:)
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10670715
DOH! Now I catch on.  Good one Luc!
0
 
LVL 32

Expert Comment

by:LucF
ID: 10670994
double :)
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10672026
I think I speak for Pete here...

(sirbounty & PeteLong in unison)
"we're not worthy" <echoing into the distance>

LOL
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 10672050
:)
0
 
LVL 32

Expert Comment

by:LucF
ID: 10672103
ROTFL!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question