|
Answer» OS is Win98SE
I keep getting disconnected from my DSL connection when I am not using it for awhile (dynamic IP), so I wrote the following file to reconnect:
echo off cls winipcfg /release winipcfg /renew exit
Now this does the job fine, *but* after exiting, there is a gray pop up box on the desktop with an "OK" BUTTON that I must click twice to clear the desktop. (It says "usage" in the two little boxes that come up in the taskbar and clicking the OK's removes them one at a time).
Now what do I do get it to exit cleanly? I have not run into this problem before with desktop MS-DOS files . . . :-/
Thank you.
KarlChange the the batch file to use the DOS VERSION instead of the windows version:
ipconfig /release_all ipconfig /renew_all
Issueing the proper commands should get rid of the "usage" boxes.Thank you. That left an open window on the desktop that I had to close, so I changed the code to:
ipconfig /release_all ipconfig /renew_all echo off cls
And that works perfectly.
This is really great; even my previous inferior one beat the stupid "support tool" provided by the ISP because it took forever to load and make the reconnection, but I knew there must be some way to get rid of clicking out of the boxes.
Thank you for the input!
Karl help someone tell me somje software questions with answers and i need 3 questions on systems life cycle?
help!!!!!!!!!!!!!!!!!!2k dummy: You said: "Change the the batch file to use the DOS version instead of the windows version:"
After thinking about it over nite, I got to wondering; what do you mean by this? They are both running in MS-DOS windows, so what is the difference. Could you educate me a little on this?
Thank you very much.
Karlipconfig was written to run under true DOS. It can be used in DOS or from a command prompt in Windows. winipcfg was written as a Windows app and intended to run under Windows. The "usage" boxes that you were getting were, in fact, error messages telling you that you were running the command inproperly. Windows was being polite and allowing you to execute the commands anyway (a rare thing in Windows ). As for closing the DOS window, Windows will close it automatically for you if that is selected in the properties dialog under the program tab. Try running winipcfg from Start/Run and look at the information it displays.Well, all it does is display the DNS numbers, etc., in a box that comes up when I run it as a command, and then gives me the OPTION of renewing, etc.
What do you mean "As for closing the DOS window, Windows will close it automatically for you if that is selected in the properties dialog under the program tab."
What program tab are you referring to?
(Please excuse my ignorance; I have always run batch files in true DOS before which requires the computer to reboot on exit, and I don't know what I am doing trying to run it from the desktop in MS-DOS window . . . obviously!)
Thank you.
Karl In Windows explorer, or from start/find, locate your batch file. Right click on it and select send to/desktop as shortcut. This will place a shortcut on your desktop. Right click on the shortcut and select properties. Under the program tab, you can choose to run it in a NORMAL window, maximized, or minimized. You can put a check box in the "close on exit" box to have Windows automatically terminate it after it runs. A double click on the shortcut is all it takes to run it.OK, I see what you are talking about. I recreated the orginal one to see what would HAPPEN with the close on exit box checked, but it still behaves the same way with 2 usage boxes that have to be OK'd out of . . . ?
Guess it just really does not want to run properly.
Very glad you told me how to code it properly last nite!
Karl
|