Archive for July 1st, 2008

01
Jul
08

Installed Applications on remote PC in VB.NET

Compared to using a ManagementObjectSearcher this is much faster and will return all installed applications including MS patches.

Dim myServerName As String = “WAADESK1″

Const HKLM = &H80000002 ‘HKEY_LOCAL_MACHINE

Dim reg_hklm, key, subkey As RegistryKey

reg_hklm = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, myServerName)

key = reg_hklm.OpenSubKey(“Software\Microsoft\Windows\CurrentVersion\Uninstall”, False)

If Not IsNothing(key) Then

For Each temp In key.GetSubKeyNames()

subkey = key.OpenSubKey(temp, False)

If Not IsNothing(subkey.GetValue(“DisplayName”)) Then

Console.WriteLine(subkey.GetValue(“DisplayName”).ToString)

subkey.Close()

End If

Next

key.Close()

End If

Continue reading ‘Installed Applications on remote PC in VB.NET’




 

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031