Have used the below code in order to get a list of the software on my computer however I want to obtain a list of all software installed on each separate computer on my LAN.
I want to get a list of computers on the network, then select the computer I want to scan. Don't want all computers to be scanned at once.
Many thanks for any related help.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
namespace Final_Year_Project
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btn_GetSoftware_Click(object sender, EventArgs e)
{
string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
{
foreach (string skName in rk.GetSubKeyNames())
{
using (RegistryKey sk = rk.OpenSubKey(skName))
{
try
{
string[] row = { sk.GetValue("DisplayName").ToString()};
var listViewItem = new ListViewItem(row);
lst_Software.Items.Add(listViewItem);
}
catch (Exception ex)
{ }
}
}
lbl_SoftwareReturned.Text += " (" + lst_Software.Items.Count.ToString() + ")";
}
}
private void lst_Software_SelectedIndexChanged(object sender, EventArgs e)
{
}