List of installed applications from Registry, are often, retrieved from here
Software\Microsoft\Windows\CurrentVersion\Uninstall
The location of the programs can be retrieved from the relavent subkey "InstallLocation". However, this seems to not apply to windows and web services.
Windows Services location can be retrieved from
SYSTEM\CurrentControlSet\Services
How can I find information about Web Services and their location from registry?
The Microsoft.Web.Administration.dll can be used to query IIS, you can do things like,
A simple usage example would be
private ServerManager serverManager
{
get
{
if (_serverManager == null)
_serverManager = new ServerManager();
return _serverManager;
}
set { _serverManager = value; }
}
and you can use the above variable to get a specific site name
var site = serverManager.Sites.First(x => x.Name.ToLower() == siteName.ToLower());
where you can get the site names from serverManager.Sites
You can also open application webconfigs and modify,query,etc
public static System.Configuration.Configuration GetConfigurationFrom(string appName, string hostName, string site)
{
return System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(@"/" + appName, site, null, hostName);
}