Page 1 of 1

Timed bach file

Posted: 05 May 2012 05:58
by sam
Hello


My name is Sam, I'm from Belgium and i need some help/advice.
I should like to know if it possible to create a bat file that starts a exe file and closes it after x minutes?

It's because i'm making a thesis on brand placement in videogames and i want people to play the game for 5 minutes and then the game shout close down.

Anyone an idea?


thx

Re: Timed bach file

Posted: 05 May 2012 06:14
by Matt20687
Hello,

Why not try

@echo off

start filename.exe
ping localhost -n 300 > nul
taskkill /F /IM filename.exe

pause>nul