CheckProductInstalled

Feb 7, 2009 at 3:32 PM
I want to use CheckProductInstalled to see that Team Explorer 2008 is installed, as a version-specific check. If users have 2005 edition or neither edition installed, I want to stop the install and send a failure message.

I seem to have problems figuring out how to test for this. Attempt to use the following fails. I was hoping to get the list of products so I know exactly what to test for. The message steers me to WMI, but I do have it installed. Does anyone have a working example of CheckProductInstalled (for Team Explorer 2008) or GetInstalledProducts?

<GetInstalledProducts MachineName="."> <Output TaskParameter="InstalledProductsXml" ItemName="InstalledProductsXmlItem" /> </GetInstalledProducts>

 

 

2/7/2009 7:23:57 AM - Using "GetInstalledProducts" task from assembly "C:\Build\RDTracker\Output\Microsoft.Sdc.Tasks.dll".
ErrorEvent detected.2/7/2009 7:23:57 AM - A task error has occured.
Message              = Could not get installed products list. If using Windows 2003, this is an optional Windows Component (under Management and Monitoring Tools->WMI Windows Installer Provider)
MachineName          = .
Username             = <null>
InstalledProductsXml[0] =
   at Microsoft.Sdc.Tasks.Configuration.InstalledProducts.InstalledProductManager.GetInstalledProducts(String machine, String username, String password)
   at Microsoft.Sdc.Tasks.GetInstalledProducts.InternalExecute()
   at Microsoft.Sdc.Tasks.TaskBase.Execute()
Generic failure
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
   at Microsoft.Sdc.Tasks.Configuration.InstalledProducts.InstalledProductManager.GetInstalledProducts(String machine, String username, String password)