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
chrisino

Windows 7 64 Bit
 
 
Help Needed Creating Batch File

Hi,

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.

Example

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
rustberger

Windows 7 Ultimate x64 sp1
 
 

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

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


@ECHO OFF
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
chrisino

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
Reply

 Help Needed Creating Batch File




Thread Tools



Similar help and support threads for2: Help Needed Creating Batch File
Thread Forum
Solved Batch File that grabs file names from folder to insert into batch file General Discussion
Solved Creating Batch File with Robo Copy General Discussion
Help creating a batch file to auto login to a website General Discussion
Creating a welcoming batch file... Software

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 11:40 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App