Saved Bookmarks
| 1. |
Solve : A "autorun batch file"? |
|
Answer» HELLO everybody! It feels like i've looked everywhere but i cant find any solution to my PROBLEM... I want to make a batch file that, when you start it it starts a program and if this program is already RUNNING i want nothing to happen.. can anybody plz make my life a bit easyer by solving this problem of mine ? Best Regards LeXWhat version of Windows are you running? You can try the TASKLIST command. Something like: CODE: [Select]tasklist /fi "imagename eq MYRPOG.exe"or Code: [Select]echo off tasklist /fi "imagename eq MYPROG.exe"|findstr PID if not errorlevel 1 goto :Nothing echo Make something happen goto :EOF :NothingWindoes XP Pro cant get it to work :-? what to put in "imagename"? Quote ...I want to make a batch file that, when you start it it starts a program and if [highlight]this program[/highlight] is already running i want nothing to happen...What is "this program"? For this to work, you need to replace the MYPROG.exe in my code with the real file name of "this program". |
|