MSI Packages using WMI queries may fail on Windows Server 2008 R2 Core

Applies to: Microsoft Hyper-V Server 2008 R2

Symptoms


Consider the following scenario. On a Windows Server 2008 R2 Core server, you attempt to run Scripts or an MSI package which uses WMI queries that require the IServiceProvider interface. The Script or MSI will fail with an error message similar to the following:

 
Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action WMIQuery script error -2147221163.


Cause


The Script or MSI package requires the IServiceProvider interface to run successfully, and attempts to call the interface through a proxy. However, the proxy for the IServiceProvider interface is not available on Windows Server 2008 R2 Core.


Resolution


Microsoft has confirmed that this is a problem in the Microsoft products listed in the Applies To section of this article.

NOTE: You may consider converting your WMI scripts to native language code to achieve the same functionality. Using scripts in the custom action is not recommended as most antivirus programs by default block the scripts.


More Information


Please refer to the following sample walkthrough on how to create a custom action DLL inside MSI Packages:

Walkthrough: Creating a Custom Action
http://msdn.microsoft.com/en-us/library/d9k65z2d(v=vs.80).aspx

Related Links:
http://blogs.msdn.com/b/heaths/archive/2005/10/24/windows-installer-on-64-bit-platforms.aspx
http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx