Script to run ipconfig commands

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.
smoore6857Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LucFEMEA Server EngineerCommented:
Hi smoore6857,

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

Greetings,

LucF
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pete LongTechnical ConsultantCommented:
MMMmm good call Luc, as theres nothing wrong with your syntax :)
0
LucFEMEA Server EngineerCommented:
I did the same thing yesterday with a tracert script... so I learn from my mistakes :)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Pete LongTechnical ConsultantCommented:
:)
0
tomar31Commented:
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
sirbountyCommented:
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
smoore6857Author Commented:
LucF: That did the trick...I would have never thought of that!

Thanks!!
0
LucFEMEA Server EngineerCommented:
You're very welcome ;-)

LucF
0
Pete LongTechnical ConsultantCommented:
good call Luc
0
LucFEMEA Server EngineerCommented:
:)
0
sirbountyCommented:
DOH! Now I catch on.  Good one Luc!
0
LucFEMEA Server EngineerCommented:
double :)
0
sirbountyCommented:
I think I speak for Pete here...

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

LOL
0
Pete LongTechnical ConsultantCommented:
:)
0
LucFEMEA Server EngineerCommented:
ROTFL!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.