INF DDInstall.WMI 區段

INF DDInstallWMI 區段包含一或多個 WMIInterface 指示詞,指定驅動程式所提供的每個 WMI 類別的特性。

[install-section-name.WMI] |
[install-section-name.nt.WMI] | 
[install-section-name.ntx86.WMI] |
[install-section-name.ntia64.WMI] | (Windows XP and later versions of Windows)
[install-section-name.ntamd64.WMI] | (Windows XP and later versions of Windows)
[install-section-name.ntarm.WMI] | (Windows 8 and later versions of Windows)
[install-section-name.ntarm64.WMI] (Windows 10 version 1709 and later versions of Windows)
 
WMIInterface={WmiClassGUID},[flags,]WMI-class-section

項目

WmiClassGUID
指定識別 WMI 類別的 GUID 值。

flags
指定下列其中一個位遮罩旗標:

0x00000001 (SCWMI_CLOBBER_SECURITY)
如果已設定,而且如果登錄中已有安全性描述元,則現有的安全性描述元會由 INF 檔案中指定的描述元取代。 如果未設定,而且如果登錄中已有安全性描述元,則會使用現有的安全性描述元,而不是 INF 檔案中指定的描述元。

WMI-class-section 指定 INF 檔案區段,其中包含設定 WMI 類別特性的指示詞。

您可以在 WMI-class-section 內指定下列指示詞:

Security=“security-descriptor-string
指定將儲存在登錄中並套用至 WmiClassGUID 所指定的 GUID 的安全性描述元。 此安全性描述項會指定存取與 類別相關聯之數據區塊所需的許可權。 security-descriptor-string 值是具有標記的字串,指出 DACL (D:) 安全性元件。

只有一個 安全性 專案可以存在。 如果有多個 [安全性 ] 專案存在,就不會為 WMI 類別設定安全性。

備註

INF DDInstallWMI 區段適用於 Microsoft Windows Server 2003 和更新版本的操作系統。

安全性描述元會與每個 WMI GUID 相關聯。 針對 Windows XP 和舊版作業系統,WMI GUID 的預設安全性描述元允許對所有用戶進行完整存取。 針對 Windows Server 2003 和更新版本,預設的安全性描述元只允許系統管理員存取。

如果您的驅動程式定義 WMI 類別,而且您不想使用預設描述元,請包含 DDInstallWMI 區段可指定儲存在登錄中的安全性描述元,並覆寫系統的預設描述元。

如需如何在 INF 檔案中指定安全性描述項的詳細資訊,請參閱 建立安全裝置安裝

範例

下列範例顯示單一 DDInstall。包含兩個 WMIInterface 指示詞的 WMI 區段。 每個指示詞都會識別 WMI 類別,並指定 類別的 WMI 類別區段

[InstallA.NT.WMI]
WMIInterface = {99999999-4cf9-11d2-ba4a-00a0c9062910},,WMISecurity1
WMIInterface = {99999998-4cf9-11d2-ba4a-00a0c9062910},1,WMISecurity2

[WmiSecurity1]
security = "O:BAG:BAD:(A;;0x120fff;;;BA)(A;;CC;;;WD)(A;;0x120fff;;;SY)"

[WmiSecurity2]
security = "O:BAG:BAD:(A;;0x120fff;;;BA)(A;;CC;;;WD)(A;;0x120fff;;;SY)"

另請參閱

DDInstall

模型