Hi, This article will help to check if IIS 7.0 or lower version is installed on the target machine. There are several ways to check, both manually and through custom code by searching in registry.
szKeyRoot="SOFTWARE\\Microsoft\\InetStp\\Components\\"; //key to search in registry
// Set the Default root
nResult = RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
if (RegDBKeyExist (szKeyRoot) < 0) then
return FALSE;
else
return TRUE;
endif;
The return value will determine whether IIS 7.0 exist or not.
- Go To Start --> Run. Type inetmgr and press OK. If you get an IIS configuration screen, it is installed, otherwise it isn't.
- You can also check ControlPanel->Add Remove Programs, Click Add Remove Windows Components and look for IIS in the list of installed components.
To Reinstall IIS.
Control Pane -> Add Remove Programs -> Click Add Remove Windows Components Uncheck IIS box Click next and follow prompts to UnInstall IIS. Insert your windows disc into the appropriate drive. Control Pane -> Add Remove Programs -> Click Add Remove Windows Components Check IIS box Click next and follow prompts to Install IIS.
There are such situations in which you need to check IIS existence from the installshield using code, then you need to search for its registry on the target machine. For a helping deed, I am presenting an example below:
szKeyRoot="SOFTWARE\\Microsoft\\InetStp\\Components\\"; //key to search in registry
// Set the Default root
nResult = RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
if (RegDBKeyExist (szKeyRoot) < 0) then
return FALSE;
else
return TRUE;
endif;
The return value will determine whether IIS 7.0 exist or not.
No comments:
Post a Comment