Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi every one...
I'm asking there is secrip for the pach to oper it or run it automaticly after tirng on the computer ...
e.g: the bath run or opend after 5 minet from tuning on the compuer >>> withuot the cliking ... only by setting a time ..

raygate,
If you keep this script in startup folder,
it will launch itself, wait for 5 minutes,
and then do "your-operations"
Also, 5 minute is approximate. Not exact.However, the 5 minutes is not from the time the machine was switched on.
It is 5 minutes from the time the user was logged in to XP and the commands in startup folder is invoked.
ping -n 300 127.0.0.1 > nul
:: Put "your operations" below here.--
Holla.

Hmm if I understood your question I think I can help.
If you are looking to have a batch run 5 minutes after the computer is turned on that is simple.
Put this as the beginning of the batch file
echo Wscript.Sleep 3000000> sleep.vbs
start /w wscript.exe sleep.vbs
del sleep.vbsThat waits 5 minutes, the 300,000 is 5 minutes in 1/1000's of a second so 1000 is 1 second.
To get it to start after the computer turns on. Save the batch file then drag and drop it in the folder Startup which is located at
Start menu - All Programs - StartupThis will add a shortcut to that start up folder, which will run that batch file on start up
I feel this is the quickest way to do that.
@Holla or anyone else who knowsI've seen the ping -n 300 used before to pause a script. I'm wondering does that give you an exact time or not? I looked up the -n and that just means count so does each ping last 1 sec exact?

.. my requst is the same idea of CD's autorn..
aqutuly ... I want to put a batch in my flash memory (removabl flash disk) ..
this batch work after (e.g: 3 menits) of plage it to the cpmputer and starting make bakeup to my dicuments (ppt and boc files)..

i'm sorry to inform you that windows xp does not support autorun on usb flash drives
You can create an autorun.inf file and have it give you options in the normal popup that usually appears when a flash drive is plugged in.
So you could add the backup option to the autorun pop but not have it automatically start like a cd does
just search google for autorun on usb drive

pball,
I timed it and got 304.8362This did a little better:
ping -n 1 -w 300000 1.1.1.1
300.1126 seconds
Your mileage may vary.
=====================================
If at first you don't succeed, you're about average.M2

pball ..
I thinke u r right .. I have to create an autorun.inf file that have order to open batch file have the order((
@Echo Offxcopy /s C:\*.ppt F:\mystuff\
))but I don't know how to set time in autorun.inf file to open ((e.g:ppt copy.bat))
file ..can some one help me to create an autorun.inf file run a batch file after 5 minte>>!!

About ping -n 1 -w 300000 1.1.1.1
Using this as a delay mechanism may work on some machines and may not on some others.I think it depends on how your DNS/router/gateway is configured.
For example, I get a ping reply from 1.1.1.1 immediately.
For me, I can not connect to 1.1.1.1, but I get a ping reply within 140ms. I think the router is returning the ping reply because it is some kind of invalid ip?I am on a DSL broadband connection.
--
Holla.

Holla,
I guess you're right that if the router returns a ping, all bets are off.
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |