检索Windows体验评级

Ray*_*sen 10 c# rating

我想在C#中检索机器的Windows体验等级.如果可能,我还想检索每个组件的数字(图形,RAM等)

这可能吗?

Sam*_*rum 7

每次用户通过控制面板计算Windows体验等级时,系统都会在其中创建一个新文件 %Windows%\Performance\WinSAT\DataStore\

您需要找到最新的文件(它们首先以最重要的日期命名,因此查找最新文件非常简单).

这些文件是xml文件,易于使用XmlReader或其他xml解析器进行解析.

您感兴趣的部分是WinSAT\WinSPR并包含一个部分中的所有分数.例如

<WinSAT>
    <WinSPR>
        <SystemScore>3.7</SystemScore> 
        <MemoryScore>5.9</MemoryScore> 
        <CpuScore>5.2</CpuScore> 
        <CPUSubAggScore>5.1</CPUSubAggScore> 
        <VideoEncodeScore>5.3</VideoEncodeScore> 
        <GraphicsScore>3.9</GraphicsScore> 
        <GamingScore>3.7</GamingScore> 
        <DiskScore>5.2</DiskScore> 
    </WinSPR>
...
Run Code Online (Sandbox Code Playgroud)