DWk Posted December 27, 2005 Share Posted December 27, 2005 I wanna launch an application....and say 3 seconds later, launch another one. Is there a way to do this? Thanks :D Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/ Share on other sites More sharing options...
0 bfoos Posted December 27, 2005 Share Posted December 27, 2005 @echo off START X:\"Path to your program"\"Program Directory"\app.exe START X:\"Path to your program"\"Program Directory"\app.exe Not sure how much of a delay there will be, but it will launch 2 programs from one batch. Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586977513 Share on other sites More sharing options...
0 DWk Posted December 27, 2005 Author Share Posted December 27, 2005 Does it launch the first one first? What about parameters? Can I include parameters? Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586977517 Share on other sites More sharing options...
0 trix Posted December 27, 2005 Share Posted December 27, 2005 thats roughly what i was gonna say Jaded1.. but it would start but apps straight after each other; i don't remember them fully but you could use a command like sleep or pause inbetween them, although i remember pause needs someone to press a button for it to continue with the script. Trix Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586977525 Share on other sites More sharing options...
0 bfoos Posted December 27, 2005 Share Posted December 27, 2005 Trix said: thats roughly what i was gonna say Jaded1.. but it would start but apps straight after each other; i don't remember them fully but you could use a command like sleep or pause inbetween them, although i remember pause needs someone to press a button for it to continue with the script. Trix I knew someone would know the pause trick. It's been a while since I messed with batch files. It should launch them in order and yes you can use switches if I remember correctly. Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586977528 Share on other sites More sharing options...
0 gshapiro Posted December 27, 2005 Share Posted December 27, 2005 The Windows Server 2003 Resource Kit Tools has a program on it called SLEEP. Use if to add pauses to batch files. Works on XP. http://tinyurl.com/a32f Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586977548 Share on other sites More sharing options...
0 mujjuman Posted December 28, 2005 Share Posted December 28, 2005 thanks! Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586978726 Share on other sites More sharing options...
0 Herby Posted December 28, 2005 Share Posted December 28, 2005 It's also possible with NirCmd without displaying anything on the screen. :) Quote NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more... Download NirCmd and copy NirCmd.exe to your System32 directory. Create a new shortcut: NirCmd.exe execmd start C:\Windows\System32\Calc.exe && NirCmd.exe cmdwait 3000 exec show C:\Windows\System32\MSPaint.exe This example starts the Calculator, waits 3 seconds and starts Paint. Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586979007 Share on other sites More sharing options...
0 Crowbar Posted December 28, 2005 Share Posted December 28, 2005 DWk said: I wanna launch an application....and say 3 seconds later, launch another one. Is there a way to do this? Thanks :D You can use Shell commands in Visual Basic i.e You would have to create a new module and insert following: - Sub Auto_Open 'Opens program x = Shell("C:\UserGuide.pdf") 'pause Application.Wait Now + TimeValue("00:00:03") End Sub Link to comment https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/#findComment-586979906 Share on other sites More sharing options...
Question
DWk
I wanna launch an application....and say 3 seconds later, launch another one.
Is there a way to do this?
Thanks :D
Link to comment
https://www.neowin.net/forum/topic/413131-batch-file-to-launch-2-programs/Share on other sites
8 answers to this question
Recommended Posts