Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System
- Imports System.Management
- Imports System.Windows.Forms
- Imports Microsoft.Win32
- Private Sub ViewSoftwareInstalled()
- Dim RegKey, subkey As Microsoft.Win32.RegistryKey
- Dim Value As String
- Dim RegPath As String = "Software\Microsoft\Windows\CurrentVersion\Uninstall"
- RegKey = My.Computer.Registry.LocalMachine.OpenSubKey(RegPath)
- Dim Subkeys() As String = RegKey.GetSubKeyNames
- Dim Includes As Boolean
- For Each subk As String In Subkeys
- subkey = RegKey.OpenSubKey(subk)
- Value = subkey.GetValue("DisplayName", "")
- If Value <> "" Then
- Includes = True
- If Value.IndexOf("Hotfix") <> -1 Then Includes = False
- If Value.IndexOf("Security Update") <> -1 Then Includes = False
- If Value.IndexOf("Update for") <> -1 Then Includes = False
- If Includes = True Then ListBox_Softwares.Items.Add(Value)
- End If
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement