I'm working on a remote administration app which needs to be able to obtain a list of patches which have been applied to an application. This Support article suggests there are two ways they could be stored:
https://support.microsoft.com/en-us/kb/888535
The ones installed via Update.exe are trivially obtained from the registry.
However, patches installed with Windows Installer are kept in the MSI and MSU(?) files. I can read them locally by invoking the Windows Installer method MsiEnumPatches with the app's GUID.
However, I need to do this remotely. I have an Admin account on the target machine. For other processes, I can use the Win32_* types and WMI to access functions remotely. However, there appears to be no equivalent function in the WMI interface for Windows Installer.
The API classes provide are at https://msdn.microsoft.com/en-us/library/windows/desktop/aa394523
There don't appear to be any from which I can obtain a list of patches applied to a specific app.
Can anyone point me in the right direction? Running msiexec.exe as a remote command would be a possibility, but the CLI switches don't seem to provide the needed functionality.