In an email list, I mentioned that we 'stamp' our repackaged .MSI's or any .MST's (Transforms) we modify with some additional registry keys, and the mini.mof has a section for pulling in those registry keys.
If you have a formal enough process for packaging applications for distribution with SMS, and are already in the habit of creating or modifying a Transform, this may be an additional step you want to incorporate into your processes.
First, decide where in the registry this information should be stored. We chose a location which was already used previously for other automation scripts and tags. I suggest you modify the attached .reg, and the below Mof edit to match, to use your Company Name. For the purposes of this blog entry, both the .reg and the .mof edit are for the fictional company "MyCompany"
Create or edit your transform; the instructions below presume you are using Installshield. Since that's what I have available to me, I could write out the step-by-step instructions. If you use a different Transform editor, please note the instructions may not be 1:1 applicable. While editing the .MST; go to Setup Design. Right-click, New Feature; call it _MyCompany. DisplayName=_MyCompany. Display=Not Visible. Required=Yes. Right-click the new _MyCompany, New Component, call it _MyCompany. Go to Registry Data within that component; on the right-hand side, right-click within the registry area and Import REG File..., and import the attached (after you've customized it) registry edit. Save the Transform.
You would do the above steps for every transform you create or edit; it would just become part of your documented routine for packaging.
The next step is to extend hardware inventory with the below mof edit. Now you'll be able to run reports, similar to the attached, to report on specific MSI attributes, as well as exactly when a product was installed on that particular computer.
//----------------------
// MyCompany Package Information
//----------------------
#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass ("win32Reg_MyCompanyPackages",NOFAIL)
[ dynamic,
provider("RegProv"),
ClassContext("local|HKEY_LOCAL_MACHINE\\Software\\MyCompany\\Packages")
]
class Win32Reg_MyCompanyPackages
{
[key] string AppNameAndVersion;
[PropertyContext("Build")] string Build;
[PropertyContext("InstallDate")] string InstallDate;
[PropertyContext("InstallTime") ] string InstallTime;
[PropertyContext("ProductCode")] string ProductCode;
[PropertyContext("ProductName")] string ProductName;
[PropertyContext("ProductVersion")] string ProductVersion;
[PropertyContext("Release")] string Release;
[PropertyContext("Transforms")] string Transforms;
[PropertyContext("UpgradeCode")] string UpgradeCode;
};
#pragma namespace ("\\\\.\\root\\cimv2\\sms")
#pragma deleteclass ("win32Reg_MyCompanyPackages",NOFAIL)
[ SMS_Report (TRUE),
SMS_Group_Name ("MyCompany Package Info"),
SMS_Class_ID ("MICROSOFT|MyCompany_PACKAGE_INFO|1.0") ]
class Win32Reg_MyCompanyPackages : SMS_Class_Template
{
[SMS_Report (TRUE), key ] string AppNameAndVersion;
[SMS_Report (TRUE) ] string Build;
[SMS_Report (TRUE) ] string InstallDate;
[SMS_Report (TRUE) ] string InstallTime;
[SMS_Report (TRUE) ] string ProductCode;
[SMS_Report (TRUE) ] string ProductName;
[SMS_Report (TRUE) ] string ProductVersion;
[SMS_Report (TRUE) ] string Release;
[SMS_Report (TRUE) ] string Transforms;
[SMS_Report (TRUE) ] string UpgradeCode;
};
//----------------------
// MyCompany Package Information
//----------------------