Computer Hope

Microsoft => Microsoft DOS => Topic started by: 2K Dummy on May 31, 2004, 11:51:21 PM

Title: Batch files in win2K
Post by: 2K Dummy on May 31, 2004, 11:51:21 PM
How do I use the set command to cause a batch file to pause for a given time (10 seconds) and then terminate automatically? Do I need to create a PIF to do this? If so, how?

The batch I use in w98 has the lines:

echo Window will close in 10 seconds
TYPE NUL | CHOICE.COM /N /CY /TY,10 >NUL

In the PIF properties it is set to close on exit. The window stays on screen for 10 seconds and closes. Help will be greatly appreciated.
Title: Re: Batch files in win2K
Post by: 2k Dummy on June 15, 2004, 08:47:52 PM
I solved my own problem. Thanks for the "expert" help (not).
Title: Re: Batch files in win2K
Post by: PCgeek8080 on July 16, 2004, 01:35:06 PM
It probably meant that during the 10 seconds, u could still exit the program by clicking on the X in the corner.
Title: Re: Batch files in win2K
Post by: 2k dummy on July 16, 2004, 06:06:47 PM
Thats true. You can do that, but that was not the desired function. The ten second pause was to allow the user the read the on screen message and then close the DOS box automatically. No user interaction required nor desired other than a double click  on the shortcut to batch file.
Title: Re: Batch files in win2K
Post by: PCgeek8080 on July 22, 2004, 04:33:29 PM
I don't think u can use a PIF for batch files, only for .com files. That's why I cant make my batch file fullscreen.