使用WMI查找暂停的Windows进程,为什么"ExecutionState"始终为null?

Kei*_*las 3 c# wmi

我在控制台程序中运行以下代码: -

 var query = string.Format("select * from Win32_Process");
            var searcher = new ManagementObjectSearcher(query);
            var collection = searcher.Get();
            foreach (ManagementObject o in collection)
            {         
                if(o["CommandLine"] == null) continue;
                if (o["ProcessId"] == null) continue;
                if( o["ExecutionState"] == null)continue;                
                var executionState =o["ExecutionState"].ToString();
                var commandLine = o["CommandLine"].ToString();
                var processId = o["ProcessId"];
                Console.WriteLine("{0}: {1} [{2}]", 
                   processId,
                   executionState,
                   commandLine);                
            }
Run Code Online (Sandbox Code Playgroud)

但是,执行状态始终为null.谁知道为什么?我试过以管理员身份运行.

使用进程资源管理器,我肯定有一个处于暂停状态的进程: -

在此输入图像描述

Hel*_*len 5

看起来ExecutionState没有实现,而且总是如此null.在官方的文档没有提及,但第三方文档做.