To get list of installed software and their InstallLocation in system


protected void Page_Load(object sender, EventArgs e)
{
GetInstalledsoftwaresAndInstallLocation();
}
public void GetInstalledsoftwaresAndInstallLocation()
{
string key = null;
key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using (RegistryKey rgk1 = Registry.LocalMachine.OpenSubKey(key))
foreach (string strsbkName in rgk1.GetSubKeyNames())
{
using (RegistryKey rgk2 = rgk1.OpenSubKey(strsbkName))
try
{
ListBox1.Items.Add((string)rgk2.GetValue("DisplayName", null));
ListBox2.Items.Add((string)rgk2.GetValue("InstallLocation", null));

}
catch (Exception)
{
Response.Write("Error Occured");
}
}

}


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: