Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
is there an easy way to check whether IIS
has been installed and running on a
Windows 2000 machine from a batch file?tia,
jazzy

I'm glad you brought that up. I'm not a wiz at "real" batches, but there's are always more than one way to do something. You could use the Sc command (Service Control, I suppose.) XP is loaded with it, but in 2000 it is an option in the resource kit, so it may be more trouble than it's worth.
sc \\%computername% Query IIsAdmin >C:\folder\iisadmin.txt would write the service info, if any, to a text file.
I use freeware utilities that work on multiple platforms. They're tiny, and I don't have to alter anything for multiple Os's.
I wrote a simple batch that does what you want, using Reg.exe, a registry tool, and Pv.exe, a simple part of PrcView.exe.(Process viewer) The two files just go into a folder with the .bat The batch is:
echo Results >C:\folder\iisadmin.txt
echo ------------------>>C:\folder\iisadmin.txt
reg.exe query HKEY_Local_Machine\system\currentcontrolset\services\iisadmin>>C:\folder\iisadmin.txt
echo ------------------>>C:\folder\iisadmin.txt
echo Processing Running
pv inetinfo.exe>>C:\folder\iisadmin.txt
notepad.exe C:\folder\iisadmin.txtIt just queries the registry for the iisadmin service and writes the result to a text file. Then, Pv queries the inetinfo.exe process and writes that to the same file. Results are:
--------------------------
Results
------------------Listing of [system\currentcontrolset\services\iisadmin]
REG_DWORD Type 32
REG_DWORD Start 2
REG_DWORD ErrorControl 1
EXPAND_SZ ImagePath C:\WINDOWS\System32\inetsrv\inetinfo.exe
REG_SZ DisplayName IIS Admin
MULTI_SZ DependOnService RPCSS;SamSS;
MULTI_SZ DependOnGroup
REG_SZ ObjectName LocalSystem
REG_SZ Description Allows administration of Web and FTP services through the Internet Information Services snap-in
REG_SZ FailureCommand "C:\WINDOWS\System32\iisreset.exe" /fail=%1%
REG_BINARY FailureActions Data to follow:80510100 01000000 01000000 03000000 64006500 03000000 01000000 03000000 01000000 03000000 01000000
[Security]
[Enum]
----------------inetinfo.exe 3716
----------------
if it's installed and running. There will be nothing for Process Running if it's not started. If the service doesn't exist, the results are:
----------------
Results
----------------
The system was unable to find the specified registry key.
----------------
I made a self-extracting zip with Ultimate zip, and you can download it here:
ftp://repair.lft.k12.la.us/software/Batches/iisadmin.exeThis is a secure server used in a school system.
I did this on xp, but the info should be the same on 2000. You may have to alter the registry path.HO HO HO

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |