Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.10.0 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Queries to get a list of Windows software

Please, what queries does the Windows agent do in order to create its list of software? I mean, I would like to know what commands I would need to run from a CMD console to get the full list of installed software as the windows agent does it. I mean, if you ask somebody to create a list of installed software you can get different answers. There is no a unique (standard) answer to that question. I mean, I can run powershell o wmic commands of installed software, but any matches with the ocs inventory of installed software. Thank you.

(https://theposhwolf.com/howtos/Using-Powershell-to-get-a-list-of-installed-software-from-a-remote-computer-fast-as-lightning/)
in OCS Inventory NG agent for Windows by (4.4k points)

5 Answers

0 votes

Hi, google say:
Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayName
Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayVersion

The same string (SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall) is in https://github.com/OCSInventory-NG/WindowsAgent/blob/cbae7714773540c190c7c1b80946ded86aef16a8/SysInfo/Registry.cpp

by (140 points)
0 votes

It seems, it also includes these queries:

  • wmic product get name
  • wmic qfe list

But still the list is not complete. My computer has +90 software items registered in OCS but Reg Query + wmic product get name + wmic qfe list only gives me around 70 software items installed.

Thank you

by (4.4k points)
0 votes

A Reg Query for WOW6432Node need to be added: 

  • Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayName
  • Reg Query HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayName
  • wmic product get name
  • wmic qfe list
by (4.4k points)
0 votes
what could be very helpful is that if ocsinventory could also capture user installed software.
User installed software can be found with this Powershell command . or the registry key shown there.

 Get-ChildItem -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match 'Chrome' } | Select-Object -Property DisplayName, UninstallString

to find any user installed software uninstall string

 Get-ChildItem -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -like '*' } | Select-Object -Property DisplayName, UninstallString

https://github.com/OCSInventory-NG/WindowsAgent/issues/163
by (21.7k points)
0 votes
Today I had to install an Oracle Client for Windows and it doesn't show up with none of those queries. It was installed under D.\app\client\Administrator\product\12.2.0 (!) Thanks.
by (4.4k points)
 
Powered by Question2Answer
...