windows:get_list_of_all_applications
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
windows:get_list_of_all_applications [2020/01/02 14:30] – created peter | windows:get_list_of_all_applications [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 10: | Line 10: | ||
===== Using WMIC ===== | ===== Using WMIC ===== | ||
+ | |||
+ | |||
+ | As administrator: | ||
<code bash> | <code bash> | ||
+ | WMIC PRODUCT LIST BRIEF | ||
</ | </ | ||
Line 18: | Line 22: | ||
<code bash> | <code bash> | ||
</ | </ | ||
+ | |||
+ | |||
+ | or | ||
+ | |||
+ | <code bash> | ||
+ | WMIC PRODUCT LIST FULL | ||
+ | </ | ||
+ | |||
+ | result: | ||
+ | |||
+ | <code bash> | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 27: | Line 44: | ||
<code bash> | <code bash> | ||
reg query " | reg query " | ||
- | reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | + | |
+ | reg query " | ||
</ | </ | ||
Line 54: | Line 72: | ||
+ | ---- | ||
+ | |||
+ | ===== Using Powershell Script ===== | ||
+ | |||
+ | <file powershell apps.ps> | ||
+ | # | ||
+ | # Generates a full list of installed programs. | ||
+ | # | ||
+ | |||
+ | # Temporary file. | ||
+ | $tmpFile = " | ||
+ | |||
+ | # File that will hold the programs list. | ||
+ | $fileName = " | ||
+ | |||
+ | # Columns separator. | ||
+ | $separator = "," | ||
+ | |||
+ | # Delete previous files. | ||
+ | Remove-Item $tmpFile | ||
+ | Remove-Item $fileName | ||
+ | |||
+ | # Creates the temporary file. | ||
+ | Create-Item $tmpFile | ||
+ | |||
+ | # Search register for programs - part 1. | ||
+ | $loc = Get-ChildItem HKLM: | ||
+ | $names = $loc |foreach-object {Get-ItemProperty $_.PsPath} | ||
+ | foreach ($name in $names) | ||
+ | { | ||
+ | IF(-Not [string]:: | ||
+ | $line = $name.DisplayName+$separator+$name.DisplayVersion+$separator+$name.InstallDate | ||
+ | Write-Host $line | ||
+ | Add-Content $tmpFile " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # Search register for programs - part 2. | ||
+ | $loc = Get-ChildItem HKLM: | ||
+ | $names = $loc |foreach-object {Get-ItemProperty $_.PsPath} | ||
+ | foreach ($name in $names) | ||
+ | { | ||
+ | IF(-Not [string]:: | ||
+ | $line = $name.DisplayName+$separator+$name.DisplayVersion+$separator+$name.InstallDate | ||
+ | Write-Host $line | ||
+ | Add-Content $tmpFile " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # Sorts the result, removes duplicate lines and | ||
+ | # generates the final file. | ||
+ | gc $tmpFile | sort | get-unique > $filename | ||
+ | </ | ||
windows/get_list_of_all_applications.1577975439.txt.gz · Last modified: 2020/07/15 09:30 (external edit)