Skip to content

Instantly share code, notes, and snippets.

@jimmyca15
Created November 10, 2017 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmyca15/8dbc65fe4a078e47419d814ace8e25f4 to your computer and use it in GitHub Desktop.
Save jimmyca15/8dbc65fe4a078e47419d814ace8e25f4 to your computer and use it in GitHub Desktop.
List installed products on Windows
$UninstallKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
$reg = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("$UninstallKey")
$products = @()
foreach ($name in $reg.GetSubKeyNames()) {
$product = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("$UninstallKey\$name")
$products += $product.GetValue("DisplayName")
$product.Dispose()
}
$reg.Dispose()
$products | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment