3

For the moment I'm using a bat which launch the program. But I would like the bat to run automatically when the program launch.

I did look into the task scheduler but this option seems to be missing.

2
  • As it currently stands, your question isn't very clear. You could write a batch script that, among other things, launch a particular program, but I guess that's not quite what you have in mind. Please clarify what problem you're trying to solve.
    – Larssend
    Nov 27, 2015 at 5:36
  • I don't want to launch my app through the bat. I want the .bat to be launch when my app start. Eg: when Chrome browser start it will launch the bat.
    – Lisa
    Nov 27, 2015 at 9:21

1 Answer 1

1

This may work based on your comment of wanting to start a batch file when Chrome is found to be running on your PC.

ECHO OFF
TASKLIST | FIND /I "Chrome.exe"
IF NOT %ERRORLEVEL%==0 EXIT
CALL "C:\Batch\Batchfile.bat"
EXIT

The part that I'm not sure about here is once the batch starts, how you tell the tasklist process to not run any longer to keep launching it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .