1.

Solve : Closing dos after a few seconds?

Answer»

hi GUYS is would like to create a batch file that close after five (or more/less seconds/minutes) after opening, is that possible in dos (i'm running windows XP Professional)

greetz

blackberry This waits 5 sek and exits the dos box in which the batch is running:


sleep 5
exit
:EOF

hope this helps
uliit didn't worked :s i tried this, perhaps i made a fault

@echo off
echo test
pause
sleep 10
echo hallo
exit
Quote

it doesn't worked :s i tried this, perhaps i made a fault

@echo off
echo test
pause
sleep 10
echo hallo
exit


I tried that, but it didn't work either

mikiI can´t find anything wrong in your batchfile.
Does XP have the sleep COMMAND?
If not, you need it from the ressource kit.

(Sleep is not a regular command in older windows versions.
It is in the ressource kit)

uliQuote
I can´t find anything wrong in your batchfile.
Does XP have the sleep command?
If not, you need it from the ressource kit.

uli


the command didn't worked whit me (and i see that it didn't worked whit "miki" to) what do you mean whit ressource kit, because i would do a lot to make it work, so i can TRY that method

btw, [glb]thanks for your respond[/glb] uliQuote
I can´t find anything wrong in your batchfile.
Does XP have the sleep command?
If not, you need it from the ressource kit.

uli

I checked it out in run==> cmd ==> sleep, and XP bat doesn't know the command...


mikiwhere can you download the resource kitThe ressource kit is a package with useful commandline tools and stuff from M$Soft.
Normally you get it with the server version of the OS.
Some SINGLE tools are available for download. Just Google.

uliQuote
The ressource kit is a package with useful commandline tools and stuff from M$Soft.
Normally you get it with the server version of the OS.
Some single tools are available for download. Just Google.

uli

OK, tnx for the respond but.... what do i have to type in google, i don't know a lot about dos (and i'm learning) but would love to know this one, so can you give me a link please

mikiFor XP I´d try something like XP Ressourcekit


uliQuote
For XP I´d try something like XP Ressourcekit


uli


Ok, thx, but my results are from 14, 2MB to 2KB, wat is the size of the program???

mikiok guys here i found the solution http://malektips.com/xp_dos_0002.html

[glb]a huge thanks goes to uli_glueck for his responses and tips[/glb]
good luck with it guys

blackberry You don't need a lot of fancy stuff to do that.

echo Window will close in 10 seconds
ping 1.1.1.1 -n 10 -w 1000 >%tmp%null

This works in 2K and XP.

Edit: You can Choice in 9x for this purpose.Quote
You don't need a lot of fancy stuff to do that.

echo Window will close in 10 seconds
ping 1.1.1.1 -n 10 -w 1000 >%tmp%null

This works in 2K and XP.

Edit: You can Choice in 9x for this purpose.


omg, olsome, it worked indeed, it's a good ALTERNATIVE, thanks


Discussion

No Comment Found