need to create a batch file

pscm

Distinguished
Aug 8, 2003
2
0
18,510
Can someone tell me how to create a .bat file to run a release/renew winipcfg on startup. I have a problem with staying connected to internet via cable. After many painful hours of trying to resolve with several different tech support people, I have discovered that after releasing/renew ipcfg that all is well and stable.
The following is info I have, I just need guidance on how to build and then put into startup.
dos command from windows prompt is: ipconfig \release_all
ipconfig \renew_all
I created a text file with these two commands then renamed to batch file. Did not work. I am assuming that maybe I need entire file path name????
 

mrface

Distinguished
Moderator
Oct 23, 2002
127
1
18,640
hey man do this.

open notepad and paste the following lines:
<font color=red>
@echo off
ipconfig /release_all

ipconfig /renew_all >> C:\renewedaddress.txt

</font color=red>
Then save the file as ipconfig.cmd. then copy the file to your startup folder.

Restart your computer or log off your profile.

After you restart open C: and you should have the file renewedaddress.txt on the drive. Open it and it will tell your IP address and if it shows an address, it worked correctly. I tried it on mine and it works.

Good luck. If you need any more help just ask me.

-=[ Addicted, Finally. ]=-
 

Eradz

Distinguished
Aug 6, 2003
1
0
18,510
you got your \ backwards. Use the / as the dude above posted :) then that should fix it. I take it your running win98?
 

pscm

Distinguished
Aug 8, 2003
2
0
18,510
I copied info into notepad, then copied into startmenu\programs\startup folder. I see the ipconfig.cmd in the startup list through system information/startup. I cannot find the renewedaddress.txt file. What did I do wrong?
 

mrface

Distinguished
Moderator
Oct 23, 2002
127
1
18,640
First, make sure your syntax is correct. and make sure your checking in the right place. Does the commands work?? If so then its fine, the ">>" appends it to a text file and is not really essential but gives you a visual of what has been done.

-=[ Addicted, Finally. ]=-