Batch File Help

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

Guest

Dear:

I need to build a batch to retrieve the PID(Process ID) for IIS(
InetInfo.exe process).

How can I do this?

OS : Windows 2000 Professional SP4

Regards
 
Raed Sawalha said:
Dear:

I need to build a batch to retrieve the PID(Process ID) for IIS(
InetInfo.exe process).

How can I do this?

OS : Windows 2000 Professional SP4

Regards

Try this:

@echo off
for /F %%a in ('tlist ^| find /i "InetInfo"') do set pid=%%a

tlist.exe is included with the Win2000 Resource Kit. You could
also use pulist.exe from the same kit:

@echo off
for /F "tokens=2" %%a in ('pulist ^| find /i "InetInfo"') do set pid=%%a
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top