Re: Check to see if a Prog is running...

Mark Weinstock (woody@interactive.net)
Fri, 13 Sep 1996 11:06:40 -0500

In article <pf0EoGgeC-rO078yn@io.com>,
areray@io.com (Rocket Ray) said something like:
>woody@interactive.net (Mark Weinstock) wrote:
>> Does anyone know if there's a way to check to see if a program is already
>> running in Win95? I often send/receive mail and forget to close down Yarn
>> when I do it. My batch file bombs out when I try to import news and Yarn is
>> running. What I'd like to do is have the batch file check to see if yarn is
>> running, then pause and tell me to close Yarn before it continues. This way
>> I wouldn't have to manually import the news/mail after my batch file dies.
>
>
>I'm unfamiliar with Win95, but it would be easy to do in DOS. Just
>start Yarn from a batch file, e.g. y.bat:
>
>@echo off
>echo active > c:\temp\y_status
>c:\yarn\yarn
>del c:\temp\y_status
>
>Then your second batch file could check for the existence of the
>y_status file, and refuse to run if it's there:
>
>if exist c:\temp\y_status goto conflict
> [rest of second batch file, same as before]
>:conflict
>echo "Can't run this program while Yarn is running!"
>exit
>
>
>This would work fine in DOS. Hope maybe this helps.
>

Should work fine in Win95, since I'm using DOS batch files to kick of
everything. I guess I was looking for the elegant solution, when the easy
one was staring me in the face <g>.

Thanks again,

-- 
Mark               woody@interactive.net          mw4j@andrew.cmu.edu
*********************************************************************
Random lie:
                           I'll call you later.
*********************************************************************