How to get all applications listed in add/remove programs or programs and features

rated by 0 users
This post has 5 Replies | 4 Followers

Not Ranked
Posts 2
NaNaNaGi Posted: 10-31-2011 10:07 AM

Hello,
I have been looking for a way to get the list of all applications in add/remove programs or programs and features. The problem is that the Get-WmiObject -class Win32_Product just returns some of all applications in the list. Where does this cmdlet look at? Which cmdlet should I use to get all the installed applications?

 

Top 10 Contributor
Posts 658
Idera Employee

This command will give you what is installed by using the Registry provider:

 

Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | 
% {Get-ItemProperty $_.PsPath} | 
where {$_.Displayname -and ($_.Displayname -match ".*")} | 
sort Displayname | select DisplayName, Publisher
Not Ranked
Posts 2

Hello Richard,
Thank you for your help. Looks like I can get most applications listed in programs and features. However, there are still a few applications that these commands does not return. One of the missing applications is "SAP Business Explorer." I see it is listed in programs and features but it is never returned by PowerShell. Is there any exception? Or was this something wrong with the application installation?

Top 25 Contributor
Posts 296
Microsoft MVP
Top Contributor

It should appear in either the list from the registry or Win32_product.  Check the uninstall data to see if it has properly installed

Top 75 Contributor
Posts 32

Thank you!  I've been looking for something like this.

I modified the code slightly so it doesn't return all the updates (which I am not concerned with):

 

Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall |

ForEach-Object {Get-ItemProperty $_.PsPath} |

where {$_.Displayname -notlike "*update*"} |

sort Displayname | select DisplayName, Publisher

 

 

 

Top 25 Contributor
Posts 94

Hi,

Simple batch script:

echo List of softwares > software_list.txt

echo ================= >>software_list.txt

reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt

find "DisplayName" temp1.txt| find /V "ParentDisplayName" > temp2.txt

for /f "tokens=2,3 delims==" %%a in (temp2.txt) do (echo %%a >> software_list.txt)

del temp1.txt temp2.txt

 

Chaitanya.
Page 1 of 1 (6 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.