Hoe kom je in de registry files?
1. START
2. uitvoeren
3. regedit
The best way to detect if IIS is installed is to look for the presence of the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp
If this key exists, then IIS is installed. If it doesn't exist, IIS isn't installed.
Ok, now that we know IIS is installed, what about detecting if the web service components of IIS are installed? There are two ways to do this. One is to look for the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\W3SVC
Again, if you don't have the web service components of IIS installed, this key shouldn't exist.
The other way is to look at the IIS subcompoments registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Setup\Oc Manager\Subcomponents
All of the values under this key are DWORDs, so if the value is 1 then it is installed. There are a lot of values listed here, but the interesting ones (at least for this discussion) are:
iis_common - IIS Common Files
iis_asp - Active Server pages (ASP) for IIS
iis_www - World Wide Web (WWW) service
As you can see, this key can tell you if ASP is registered with IIS and if the web service components are installed.
Now that we know if ASP is registered, what about ASP.NET? Once again, we turn to the registry and look for the presence of the following keys:
.NET 1.1 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\1.1. 4322.0
.NET 2.0 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0. 50727.0