cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kimcarlsen
Level 4

CA get installdate for patch

Hi

I need a script to get the Installdate and the display info for a patch installed on a system. How do I get this information?
It's not possible to read the registry under ..\uninstall as they changed the way it's stored on Vista. So I thought I could use the Installer API and was looking at the function MsiGetPatchInfoEX. But I can't figure out how that function works or if it's possible to access it from a vbs script?

Regards
Kim
Labels (1)
0 Kudos
(1) Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

To use this API you would need to provide the patch GUID for the patch that you would like information for (this is stored in the built .MSP's summary info stream similar to an MSI's package code), the product code for the product, and the properties you're looking for (INSTALLPROPERTY_INSTALLDATE for the date the patch was applied, for example). The UserSid could be left NULL for a per-machine install with the Context parameter set to MSIINSTALLCONTEXT_MACHINE (this could get a bit more complicated if the install is per-user).

The Patch object in the MSI automation interface (http://msdn2.microsoft.com/en-us/library/aa370594(VS.85).aspx) looks like it can provide the same information (from the PatchProperty property of this object), but you still need to provide the same information to get a Patch object that the MsiGetPatchInfoEx API requires.
0 Kudos