Solved

Script to run ipconfig commands

Posted on 2004-03-24
15
1,872 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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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 …
Suggested Courses
Course of the Month5 days, 21 hours left to enroll

626 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