| 1. |
Solve : Batch File ~ Help Please? |
|
Answer» Halo All , Halo All ,Most people don't know about the pause/break thing, but if you add Code: [Select]ping localhost -n (Time in seconds) -w 1000 > nul somewhere in the loop, it should serve your purposes. If you don't want them to close it, then you can use the .exe I made just now to do it (it runs in "ghost mode"). [attachment deleted by admin]Or the Sleep command, if you have XP. Parameters: Code: [Select]Sleep [Seconds to Wait] But if you want it in a more precise time, like in milliseconds then use Ping that Helpmeh advised. Hope this helps ,Nick(macdad-)Quote from: macdad- on May 10, 2009, 03:08:26 PM Or the Sleep command, if you have XP.You need to download it first...even if you have XP.Quote from: macdad- But if you want it in a more precise time, like in milliseconds then use Ping The sleep.exe I use (server 2003 resource kit) has a -m switch that specifies time in milliseconds sleep -m 250 waits a quarter of a second. Code: [Select]On Error Resume Next comp=array(".") q="select * from __InstanceCreationEvent within 1 where " & _ "targetinstance isa 'win32_process' and "& _ "(targetinstance.name='sndvol32.exe' or targetinstance.name='rundll32.exe')" for each c in comp set a=getobject("winmgmts:\\" & c).execnotificationquery(q) do a.nextevent.targetinstance.terminate createobject("wscript.shell").run "d:\setvol.exe 10" loop next vbscript alternative to prevent sndvol32.exe to run, save the above as prevent.vbs Code: [Select]wscript prevent.vbs to manage whole LAN, you can add each client computers name to the array and run the vbs from eg.cashier computer. above code only tested on local computer.Thank you guys all soo much for the help & ADVICE for now I'm just using a simple batch file converted to exe with ping for the delay. Sleep & the vbscript idea definitely sounds PROMISING will give it a try and let you all know the outcome. Thanks once again |
|