Discussion Locked

ipconfig batch file

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi!

One of my clients who's running Windows 98 has been failed to get the ip address from DHCP server whenever he turn on his laptop, and I want him get ip address successfully again by only double clicking this simple batch file that I created incorrectly. Can anybody correct this batch file to work properly so I can help my clients to get on the network quickly without typing them manually one by one.
Thanks.
-----------------------------
@echo off
c:\winnt\system32\command.exe
ipconfig /release_all
ipconfig /renew_all
------------------------------

11 replies

by ctr2000

c:\winnt\system32\cmd.exe
ipconfig /release
ipconfig /renew

I see you are running windows 2000 and command.exe is for windows 98. I got this to work and you can set it up as a scheduled task by going to start-programs-accessories-system tools-scheduled tasks. When you open up scheduled tasks right click within the window and choose new scheduled task. Then give it a name and then double click on it and in the next window click on browse and go to the C drive where you saved the batch (make sure the extension is .bat) file and double click on it and it will pick it up. Then you could set the task to start at system start up all the time (if this is what you want).
Or choose how you want to do it. Also you might have to set a password for it to run. That being the password of the current user.
Hopefully this helps out.

David.

by ctr2000

To make this work in 98 get rid of the 2nd line in your batch file and it should work fine. Also go to the c drive where you saved your file and right click on the file and choose properties then in the second tab of the properties window check a box called close on exit. This will close when the batch program is run from scheduled tasks.
I got this to work on 98 too.

by fenaikh

Hi

Batch files takes .CMD in win/NT/2K/XP.

rename your batch file to XXX.CMD

And you may not need the 2nd line

c:\winnt\system32\command.exe

Good luck

Mohamed

note:

.CMD Windows Script File and its OS/2 command file.

by fenaikh

CMD.exe
http://www.ss64.demon.co.uk/nt/cmd.html

***Very Important NOTE *********
After you copy the URL a space or a %20 maybe gets inserted in the URL when you paste it into your browser. Delete any spaces or such characters from the URL for the page to be loaded.
***Very Important NOTE *********

by fenaikh

Hi
If the os Windows 98 then the command because of the directory for command.com is not c: \winnt\system32\command.exe which is win/NT/2K/XP
but %systemroot%\system
if the os is a win/NT/2K/XP then the path maybe correct but the command should be cmd.

by gigelul

Hi,
"c:\winnt\system32\command.exe" is not a Win98 path.
Try:
@echo off
rem if require add the next line
rem cd windows
ipconfig /release_all
ipconfig /renew_all

Also you can use "Winipcfg.exe" on Win98.
In my opinion you must check Network setup and correct the problem. This process must be done automaticaly.

This discussion is closed to new replies.