共用方式為


Configuration Manager可執行檔動作

在Configuration Manager中,可執行檔動作會執行程式,或使用針對該檔案類型向 Windows 註冊的程式開啟檔案。

下列屬性和元素專屬於執行程式的動作:

  • Class專案 ActionDescription 屬性設定為 Executable

  • 專案 Executable 是程式路徑的父 FilePath``, 代,而 Parameters 對於 ,則是傳遞至可執行檔的參數。

範例可執行檔動作 XML

<ActionDescription Class="Executable" DisplayName="Test Action (execute)" MnemonicDisplayName="A test item" Description="A test item Description">
  <ShowOn>
    <string>DefaultHomeTab</string>
    <string>ContextMenu</string>
  </ShowOn>
  <!--<ResourceAssembly>
    <Assembly>Microsoft.ConfigurationManagement.dll</Assembly>
    <Type>Microsoft.ConfigurationManagement.AdminConsole.Properties.Resources.resources</Type>
  </ResourceAssembly>-->
  <!--<ImagesDescription>
    <ExternalImage>
      <Assembly>AdminUI.Package.dll</Assembly>
      <Type>Microsoft.ConfigurationManagement.AdminConsole.Package.SmsPackageUtils</Type>
      <Method>ShowPackageLockedIcon</Method>
    </ExternalImage>
    <ResourceAssembly>
      <Assembly>AdminUI.UIResources.dll</Assembly>
      <Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.Properties.Resources.resources</Type>
    </ResourceAssembly>
    <ImageResourceName>New</ImageResourceName>
  </ImagesDescription>-->
  <!--<ImagesDescription AliasProperty="OwnedByThisSite">
    <ResourceAssembly>
      <Assembly>AdminUI.UIResources.dll</Assembly>
      <Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.Properties.Resources.resources</Type>
    </ResourceAssembly>
    <AliasResourceAssembly>
      <Assembly>AdminUI.UIResources.dll</Assembly>
      <Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.SMS_Collection-OwnedByThisSite.resources</Type>
    </AliasResourceAssembly>
    <ImageResourceName>CollectionsIcon</ImageResourceName>
  </ImagesDescription>-->
  <!--<ActionStateAssembly>
    <Assembly>AdminUI.Report.dll</Assembly>
    <Type>Microsoft.ConfigurationManagement.AdminConsole.Report.ReportsUtilityClass</Type>
    <Method>EnableReportMenu</Method>
    -->
  <!--Method signature: public static bool EnableMenu(object sender, ScopeNode scopeNode, ActionDescription action, ResultObjectBase resultObject)-->
  <!--
  </ActionStateAssembly>-->
  <!--<InstancePermissions>
    <SecurityFlagsDetailDescription BitName="Delete" BitValue="4" DependsOn="1" />
  </InstancePermissions>-->
  <!--<MatchPattern>[^1]</MatchPattern>
  <MatchValueToTest>##SUB:Order##</MatchValueToTest>-->
  <Executable>
    <FilePath>https://go.microsoft.com/fwlink/?LinkId=67307</FilePath>
  </Executable>
</ActionDescription>

其他專案和屬性記載于 ActionDescription中。

另請參閱

Configuration Manager動作
如何建立Configuration Manager動作
如何尋找Configuration Manager節點 GUID