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

Similar help and support threads
Thread Forum
Creating Batch File to Recompress MS Cabinet Files
I'm trying to write a batch file that will scan/search a directory for MS Cabinet files. Then extract the contents of each cabinet file. The extracted contents are then "stored" in a cabinet file with the same file name as the original file. The new file then overwrites the old file. Presently,...
Creating the PPPOE internet connection using batch file
I have a PPPoE internet connetion from my ISP. Every time I want to access the internet connection I have to goto the setting and in that I have to open it and then have to dial it. This is the traditional way to log in but I wanted to make a batch file in which the PPPoE user name and password is...
Network & Sharing
Creating Batch File with Robo Copy
Hi I am currently running the following to supposedely create a directory IE V:\Backup Folder\Pictures\Backup 21-05-2012 robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%" Evrything works fine except the backed up pictures folder is...
General Discussion
Help creating a batch file to auto login to a website
I have created the following batch file to automatically load and login to a site, I created it and tested it on a computer running xp, but I can't get it to work on a windows 7 machine... "@ECHO OFF TITLE Water Monitor Auto Start Up mode con: cols=42 lines=1 REM Create a time delay...
General Discussion
Creating a welcoming batch file...
I need help creating batch file that will do the following... I want it to echo "Welcome (insert name here)." I want it to say "How are you today, good or bad?" If G, I want it to display, "That's great to know, sir! Would you like me to open your homepage? If Y, I want it to execute cd...

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 08:21.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App