在MSDN上完成SCCM 2012 SDK文档后,我目前正试图安装应用程序管理扩展:
http://msdn.microsoft.com/en-us/library/hh949507
文档说明我应该调用DeploymentTypeExtender.Extend:
using DCM = Microsoft.ConfigurationManagement.AdminConsole.DesiredConfigurationManagement;
[...]
ConnectionManagerBase connectionManager = new WqlConnectionManager();
connectionManager.Connect("SiteServerName");
DeploymentTypeExtender.Extend(@"C:\RdpTechnology.cmdtx", new DCM.ConsoleDcmConnection(connectionManager, null), @"\\SiteServerName\root\sms\site_ABC");
然而,当我拨打电话时,我回来的只是一个例外:
Unhandled Exception: Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException: The SMS Provider reported an error. ---> System.Management.ManagementException: Generic failure
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.Put(PutOptions options)
at System.Management.ManagementObject.Put()
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
--- End of inner exception stack trace ---
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
at Microsoft.ConfigurationManagement.AdminConsole.DesiredConfigurationManagement.ConsoleDcmConnection.Microsoft.ConfigurationManagement.DesiredConfigurationManagement.IDcmStoreConnection.StoreNewItem(ConfigurationItem item)
at Microsoft.ConfigurationManagement.ApplicationManagement.DeploymentTypeExtender.CreateTechnologyBasedConfigurationItem(ZipPackagePart zipPackagePart, IDcmStoreConnection connection)
at Microsoft.ConfigurationManagement.ApplicationManagement.DeploymentTypeExtender.PostDeploymentTypeExtension(String deploymentTypeExtensionFilePath, IDcmStoreConnection connection, String wmiLocation, Boolean comprehensive, Boolean revision)
at Microsoft.ConfigurationManagement.ApplicationManagement.DeploymentTypeExtender.Extend(String deploymentTypeExtensionFilePath, IDcmStoreConnection connection, String wmiLocation)
at RdpTechnology.Build.DeploymentTypeExtenderUtil.Extend(String deploymentTypeExtensionFilePath) in C:\Users\goakley\Documents\SCCM Deployment Type\AppMan\Build\DeploymentTypeExtenderUtil.cs:line 38
at RdpTechnology.Build.Program.Main(String[] args) in C:\Users\goakley\Documents\SCCM Deployment Type\AppMan\Build\Program.cs:line 22
DebugView中显示了更多信息:
[1520] SmsAdminUISnapIn Error: 1 :
[1520] System.Management.ManagementException\r\nGeneric failure \r\n at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
[1520] at System.Management.ManagementObject.Put(PutOptions options)
[1520] at System.Management.ManagementObject.Put()
[1520] at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)\r\nManagementException details:
[1520] instance of SMS_ExtendedStatus
[1520] {
[1520] Description = "The digest is not valid";
[1520] ErrorCode = 1078462235;
[1520] File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspconfigurationitem.cpp";
[1520] Line = 2142;
[1520] Operation = "PutInstance";
[1520] ParameterInfo = "";
[1520] ProviderName = "ExtnProv";
[1520] StatusCode = 2147749889;
[1520] };
[1520] \r\n
这向我建议我在我尝试安装的应用程序管理扩展中捆绑的XML文件之一已损坏 - 但它都是直接从MSDN复制和粘贴的。