5

To follow-up and expand upon this question, I want to know how to get a list of applications as shown in appwiz.cpl which always shows all installed applications.

From here, we know that other installers like InstallShield, Wise, NSIS do not register the applications with WMIC so

wmic product get name,version

shows me some applications including Visual C++, Apple Software Update and others but many are missing, like:

  • 7-Zip
  • Google Chrome
  • Mozilla Firefox
  • Mozilla Thunderbird
  • VLC

Is there a powershell or other method that can show all installed applications?

3 Answers3

6

"Programs and Features", which can also be launched using the Control Panel file appwiz.cpl lists all applications which have registered themselves in a defined way in order to appear in this list. This is traditionally the main entry point to enable users to typically remove or modify applications that are installed.

I say traditionally, as Windows now has, under the new Settings options a 'Apps & Features' page (%windir%\ImmersiveControlPanel\SystemSettings.exe). This list of applications also includes what are now referred to as Windows Modern apps, aka metro, full screen, or Windows Store apps. As the question was specifically about Programs and Features, this answer will not cover those.

As a developer, there are a variety of ways to create an installer to package an application, be it using Windows Installer, and therefore creating a MSI file, with a toolkit such as WiX or InstallShield. Then there are custom installers created by the developers. In any case to ensure your application appears in the above list, you only need to define two values despite there typically being many more standard values, these are:

  • DisplayName
  • UninstallPath

The "Uninstaller" keys, depending on the applications installed, can be found in the following registry locations:

32-bit computer:

  • HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

64-bit computer:

  • HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKCU:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall

Where: 32-bit applications on a 64-bit application are typically found under the Wow6432node. Those under HKCU are installer for the user, rather than the computer and is sometimes an option presented in the installer.

Therefore, to enumerate all applications installed, as Explorer.exe does, when you launch Program and Features, you have to consider the values under the above keys.

There is one additional point to note, applications can "hide" themselves from appearing in this list using the SystemComponent DWORD. The value can be 1 or 0, where 1 would hide the application from the list. The intention I assume was for system components such as .NET which wouldn't typically be managed by the user to remain hidden. This is however typically used by vendors which install multiple components for a suite and then create a unified uninstaller to make it easier to remove the application in its entirety and to remove each component in the correct order.

Therefore, the following PowerShell command, will enumerate each of the above Uninstall keys, and where the SystemComponent is not 1 and there is a DisplayName value, will print the DisplayName:

foreach ($UKey in 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\*'){foreach ($Product in (Get-ItemProperty $UKey -ErrorAction SilentlyContinue)){if($Product.DisplayName -and $Product.SystemComponent -ne 1){$Product.DisplayName}}}

To print DisplayName, DisplayVersion, Publisher and InstallDate in a table, run:

$results = foreach ($UKey in 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\*') { foreach ($Product in (Get-ItemProperty $UKey -ErrorAction SilentlyContinue)) { if ($Product.DisplayName -and $Product.SystemComponent -ne 1) { [PSCustomObject]@{ DisplayName = $Product.DisplayName; DisplayVersion = $Product.DisplayVersion; Publisher = $Product.Publisher; InstallDate = $Product.InstallDate } } } }; $results | Format-Table -AutoSize

Now of course there are other applications you might class as installed but if they don't register in one of the above locations they will not appear and are out of scope for the question.

There are other ways to get at the items in this list but may only return a subset due to only returning MSI based applications for example.

xypha
  • 4,890
HelpingHand
  • 2,598
  • 12
  • 16
4

Enter this after opening Powershell having it run as administrator

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize

PowerShell will give you a list of all your programs, complete with the version, name of the developer, and even the date you installed it.

list of installed software in powershell

You will probably want to export that to a file though, which is also easy enough. You can just send the output using the > symbol and adding the path to a new text file that you want to create. For example:

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > C:\Users\Lori\Documents\InstalledPrograms-PS.txt

list of installed programs exported to text file

Here is the source.

desbest
  • 1,058
1

Question : Is there a powershell or other method that can show all installed applications?

Refer to How to Create a List of Your Installed Programs on Windows


$outputFile = "$env:APPDATA\Installed_Applications.txt"
$OS_Architecture = $env:PROCESSOR_ARCHITECTURE
if($OS_Architecture -eq 'x86') 
{
    #write-host '32-bit'
    $key = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
}
else
{
    #write-host '64-bit'
    $key = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
}

Get-ItemProperty $Key | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize | Out-File $outputFile -Encoding UTF8 -Force Start-Process $outputFile


Here is a Self-elevate script to get everything with admin rights :

cls
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
  if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
      #$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
      $CommandLine = $MyInvocation.InvocationName
      Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
      Exit
     }
    }

$outputFile = "$env:APPDATA\Installed_Applications.txt" $OS_Architecture = $env:PROCESSOR_ARCHITECTURE if($OS_Architecture -eq 'x86') { #write-host '32-bit' $key = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall*" } else { #write-host '64-bit' $key = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall*" }

Get-ItemProperty $Key | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize | Out-String -Width 300 | Out-File $outputFile -Encoding UTF8 -Force Get-AppxPackage -AllUsers | Out-File -Append $outputFile -Encoding UTF8 -Force Start $outputFile

Hackoo
  • 1,410