Computer Auditing – Part 2 – Installed Software

Getting a list of installed software with a script is never going to be perfect – there are just too many loopholes, but you can get close. This is part 2 of 4 (Part 1 is here, Part 3 is here, and Part 4 is here).

In the past I’ve used WMI’s Win32_Product class to achieve these results (though that was a long time ago) – but please DO NOT use the Win32_Product WMI class – even if it looks like a much easier/simpler/cleaner solution.  That class has many side-effects that you may not be aware of (see here and here).

Below is the most comprehensive solution I’ve been able to come up with to-date, but again, it’s not bulletproof – just “good enough” for most of what I’d use it for.  It also includes most Windows and Office updates in its output.

This script queries two different parts of the Windows Registry and returns an object, $software, with the display name, version, install date (if recorded), and uninstall string of each piece of software found.

 

 

Out of interest, the (not to be used) WMI method on my computer only found 106 bits of software installed, whereas the registry method found 313.  A decisive victory:

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *