Solved

Script to run ipconfig commands

Posted on 2004-03-24
15
1,871 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
  • +2
15 Comments
 
LVL 32

Accepted Solution

by:
LucF 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:LucF
ID: 10669810
I did the same thing yesterday with a tracert script... so I learn from my mistakes :)
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

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).
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

710 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