Help Needed Creating Batch File

chrisino

New member
Local time
7:34 AM
Messages
17
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 Computer

OS
Windows 7 64 Bit
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom 2014 Upgrade.
OS
Windows 7 Ultimate x64 sp1
CPU
Intel i5 4590 Haswell refresh 3.30GHz(3.7GHz Turbo) Quad.
Motherboard
Gigabyte GA-H97-HD3 LGA 1150
Memory
G.Skill Ripjaws F3-12800CL9D-8GBRL 16GB (4x4GB) (1600MHz)
Graphics Card(s)
Gigabyte GeForce GT 740 4GB
Sound Card
Onboard. Realtek High Definition Audio
Monitor(s) Displays
Asus VW266H x 2
Screen Resolution
1920x1200 @ 60Hz
Hard Drives
Samsung 840 EVO 120GB SSD /
Samsung 850 Pro Series 1TB SSD x 2 /
Western Digital WD Black 1TB /
Western Digital VelociRaptor 150 GB.
PSU
Corsair 650 hx modular
Case
Cooler Master
Cooling
3x fans
Keyboard
Logitech Media Keyboard 600
Mouse
Logitech Performance Mouse MX
Internet Speed
Cable Broadband 100mbs/D, 2mbs/U
Antivirus
MSE, Malwarebytes, AdwCleaner, SUPERAntiSpyware
Browser
Mozilla Firefox, Google Chrome
Other Info
1GB DataRam
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 Computer

OS
Windows 7 64 Bit
Back
Top