Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Help Needed Creating Batch File

23 Nov 2011   #1

Windows 7 64 Bit
Help Needed Creating Batch File


I have 2 files that are in the same directory which I want to start one after the other.

I have created a simple batch file like this which opens 2 files at the same time.


Start Server.exe
Start Game.exe

Is it possible to leave say a 10 second gap between opening the Server.exe and Game.exe? Also is it possible to quit Server.exe when I exit Game.exe?

It probably isn't possible but I am pretty useless at scripts and need some help.

Any help would be appreciated.

My System SpecsSystem Spec

23 Nov 2011   #2

Windows 7 Ultimate x64 sp1

Here you go. Just put the location where the first.exe and second.exe are.
The 10000 = 10 seconds.

start "HandBrake" "G:\Program Files\HandBrake\Handbrake.exe"

start first.exe
echo wscript.sleep 10000 > temp.vbs
start /wait temp.vbs
start second.exe
del temp.vbs
My System SpecsSystem Spec
23 Nov 2011   #3

Windows 7 64 Bit

Thanks rustberger. It worked like a treat. Is it possible to quit the first loaded file after the second file exits?

I guess this isn't something that a simple batch file can do and is more a programming issue?
My System SpecsSystem Spec


 Help Needed Creating Batch File

Thread Tools

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:52 PM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33