Checking for see if IE is open ...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Group:


I want to be able to write a batch file to check to see if IE is open. Is
there a DOS command which can do this?

Thanks in advance.


Michael
 
Hello Group:


I want to be able to write a batch file to check to see if IE is open. Is
there a DOS command which can do this?

Thanks in advance.


Michael

See tip 6313 in the 'Tips & Tricks' at http://www.jsiinc.com or pulist.exe (tip 3737)

set IE=N
for /f "Tokens=1" %%a in ('tasklist^|Find /I "iexplore.exe"') do (
set IE=Y
)
If "%IE%" EQU "Y" go IEisRunning


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Jerold:


Thanks for the link. I have W2K Server SP4 on my laptop and have recently
downloaded the support tools which includes "tlist". The link gives some
expamples but includes "Tokens" which the batch complains about.


thanks again,


Michael
 
In microsoft.public.win2000.cmdprompt.admin =?Utf-8?B?MTBfYV9j?=
wrote:
Jerold:


Thanks for the link. I have W2K Server SP4 on my laptop and have
recently downloaded the support tools which includes "tlist". The
link gives some expamples but includes "Tokens" which the batch
complains about.

You can change to use "token 2" or just use pslist.ese (Sysinternals)
and change it from
('tasklist^|Find /I "iexplore.exe"')
to
('pslist^|Find /I "iexplore"')
 
Mark:


Thanks for the update. I fumbled around and got it to work with -

tlist|find /i "iexplore.exe"
if not errorlevel 1 (
set IE=Y
goto IEisRunning
:IEisRunning
echo inside IEisRunning
:end


Michael
 
10_a_c said:
Thanks for the update. I fumbled around and got it to work with -

tlist|find /i "iexplore.exe"
if not errorlevel 1 (
set IE=Y
goto IEisRunning
:IEisRunning
echo inside IEisRunning
:end

Hi Michael,
you know of conditional execution? This does it shorter:

pslist|find /I "iexplore"&&echo IE running||echo IE not runnning

substitute echo with a goto or whatever you like.
 
Back
Top