Before you jump on this seemingly easy question, read carefully.

I am aware that you can use Win32_Product to grab installed software. The problem is that this command has a side effect. It generates EventCode 1035.

" Windows Installer reconfigured the product…"

It does this for EVERY enumeration. If you have 100 products installed, 100 events generate. Since every computer is sending event logs, imagine that times nearly 100?

My workaround would be to ignore that specific event, but I’d rather not have to do it. Is there any other command, aside from Remote Registry, that can accomplish the same goal? Or perhaps a way to suppress that seemingly garbage event?

Another workaround is to call the powershell command, but ignore what it returns. Instead, I’d read the event viewer data. It essentially is a duplicate of the return value of my PS command, just less data. It’s a workaround because it’s less data, not configurable, and not a standardized return value (hard to predict how to parse).

2 Spice ups

Take a look here, it may help as it offers an alternative to using Win32_Product: Use PowerShell to Find Installed Software - Scripting Blog [archived]

1 Spice up

To avoid the event id 1035, you could use wmic in an admin console session instead.

wmic /output:C:\InstalledPrograms.txt product get name,version

or

wmic /output:C:\InstalledPrograms.csv product get /format:csv.xls

Our you could just use “Spiceworks” and print out a report on the PC/Server.

Wasn’t expecting that exact of a solution. Perfect.

1 Spice up