使用WMI的此代碼不會產生任何結果。我正在使用以下WMI代碼測試wind 7。WMI Win32_PageFileSetting
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_PageFileSetting");
foreach (ManagementObject queryObj in searcher.Get())
{
}
// The for loop does not get executed.
此查詢需要SeCreatePagefilePrivilege權限。 – 2013-02-26 18:36:09