Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create a bat file with exe files in the background?

6 views
Skip to first unread message

Max

unread,
Jul 4, 2008, 5:25:44 AM7/4/08
to
I have a problem with a game(Pes2008): the refresh rate(a CRT monitor)
is locked at 60 hz.


To solve the problem I found a program(refreshlock) which force
applications to use the desired refresh rate for every resolution.

The only trouble is that I have to remember to run the program before
the game, so I thought of using a bat file:


"C:\refreshlock\refreshlock.exe"
"C:\Program Files (x86)\KONAMI\Pro Evolution Soccer 2008\PES2008.exe"

But this won't work: how can I run the first executable in background so
that the game will start after launching refreshlock.exe?

I tried adding "start" before the first executable, but it didn't work
either.


I think I need something similar to this(Linux):
http://www.hcidata.info/background-job.htm

Is there something similar in the command prompt?
Thanks.


foxidrive

unread,
Jul 4, 2008, 6:52:08 AM7/4/08
to
On Fri, 04 Jul 2008 11:25:44 +0200, Max <maxf...@despammed.com> wrote:

>The only trouble is that I have to remember to run the program before
>the game, so I thought of using a bat file:

Try this: Win9x/me doesn't need the ""

@echo off
start "" "C:\refreshlock\refreshlock.exe"
start "" "C:\Program Files (x86)\KONAMI\Pro Evolution Soccer 2008\PES2008.exe"

Max

unread,
Jul 4, 2008, 1:04:42 PM7/4/08
to
foxidrive ha scritto:

> On Fri, 04 Jul 2008 11:25:44 +0200, Max <maxf...@despammed.com> wrote:
>
>> The only trouble is that I have to remember to run the program before
>> the game, so I thought of using a bat file:
>
> Try this: Win9x/me doesn't need the ""
>
> @echo off
> start "" "C:\refreshlock\refreshlock.exe"
> start "" "C:\Program Files (x86)\KONAMI\Pro Evolution Soccer 2008\PES2008.exe"


It works! :-)
But what do those quotation marks do?

Thanks, very helpful!

Timo Salmi

unread,
Jul 4, 2008, 1:20:53 PM7/4/08
to
Max <maxf...@despammed.com> wrote:
> foxidrive ha scritto:
>> start "" "C:\refreshlock\refreshlock.exe"

> It works! :-)
> But what do those quotation marks do?

START /?
http://www.netikka.net/tsneti/info/tscmd036.htm

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm

Max

unread,
Jul 4, 2008, 1:30:29 PM7/4/08
to
Timo Salmi ha scritto:

> Max <maxf...@despammed.com> wrote:
>> foxidrive ha scritto:
>>> start "" "C:\refreshlock\refreshlock.exe"
>
>> It works! :-)
>> But what do those quotation marks do?
>
> START /?
> http://www.netikka.net/tsneti/info/tscmd036.htm

Thanks.

And if I want to close refreshlock.exe automatically(when I quit Pes),
how could I do?

Max

unread,
Jul 4, 2008, 1:33:38 PM7/4/08
to
Max ha scritto:

> And if I want to close refreshlock.exe automatically(when I quit Pes),
> how could I do?


I have to use taskkill, sorry :-)

Max

unread,
Jul 4, 2008, 2:01:59 PM7/4/08
to
Max ha scritto:


This is what I came up with:

@echo off
start "" "C:\refreshlock\refreshlock.exe"

"C:\Program Files (x86)\KONAMI\Pro Evolution Soccer 2008\PES2008.exe"

taskkill /T /F /im refreshlock.exe


It seems to work perfectly, but every suggestion is welcome.

0 new messages