Link to home
Start Free TrialLog in
Avatar of Yohaheho
YohahehoFlag for United States of America

asked on

ipconfig /release /renew batch file won't run


Sometimes at my house my wife's (XP home) computer loses conectivity to the internet. If I manually ipconfig /release and ipconfig /renew the problem is solved and internet is again available. My problem is I can' t get it to run in a batch file.

Here is the file I'm running

ipconfig /release
ipconfig /renew

Seems pretty straight forward but when I execute it the first line scrolls by the cmd window over and over. ie:

C:\>ipconfig /release
C:\>ipconfig /release
C:\>ipconfig /release
C:\>ipconfig /release

And it keeps scrolling to infinity.
I've tried putting pause on the second line but it just keeps scrolling.

Any ideas? My goal it to release and renew the ip with just a double click for my wife.

Thanks
Yohaheho



 
ASKER CERTIFIED SOLUTION
Avatar of For-Soft
For-Soft
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Yohaheho

ASKER

For-Soft,

Damn! Good one. That was the problem. As soon as I read it it dawned on me.

Thanks
Yohaheho
Came searching for IPCONFIG solutions today - my XP seems to not show the path anymore for system32.  

Curious about your solution - why would ipconfig.bat not work?

ub
Every time IPCONFIG command was run inside the IPCONFIG.BAT. IPCONFIG.BAT was run instead of IPCONFIG.EXE.
So batch entered a loop running itself again and again...
And the order of execution is based on the path statement?  or do .bats get "queued" ahead of .exes?
Current directory is always the first to look in for files. The path statement is interpreted after current directory search.