Solved

Script to run ipconfig commands

Posted on 2004-03-24
15
1,868 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:
Luc Franken earned 50 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:Luc Franken
ID: 10669810
I did the same thing yesterday with a tracert script... so I learn from my mistakes :)
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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:Luc Franken
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:Luc Franken
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:Luc Franken
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:Luc Franken
ID: 10672103
ROTFL!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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