2

Is there any way of scanning and querying installed software on Windows faster than using WMI?

Ken White
  • 123,280
  • 14
  • 225
  • 444
GreatDane
  • 683
  • 1
  • 9
  • 31

1 Answers1

2

If you have enough permissions, you may scan the local registry. Pertinent entries should be:

  • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

An example follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7BF61FA9-BDFB-4563-98AD-FCB0DA28CCC7}]
"Comments"=""
"DisplayVersion"="8.0.1557"
"InstallDate"="20131119"
"Publisher"="Microsoft Corporation"
"DisplayName"="IIS 8.0 Express"

Iterate through each Child, and extract the desired information (DisplayName, for example.)

OnoSendai
  • 3,960
  • 2
  • 22
  • 46
  • Follow-up: is there any guarantee that I will find here all software installed with any sort of installer? Or could it be that if nothing like this is specified when creating the installer for an app, then there might not be an entry for that app in the local registry? – GreatDane Dec 02 '13 at 15:28
  • 1
    To my knowledge, as long as the installer makes use of Setup API or Windows Installer the entries will be present; they're required if a program is to appear at the 'Programs and Features' list. Standalone applications that don't require installation (and, therefore, have no uninstall per se) won't appear. – OnoSendai Dec 02 '13 at 15:48