我想用C#检索计算机的Windows体验等级.如果可能的话,我还要检索每个组件的编号(图形,RAM等)
I'm looking to retrieve a machine's windows experience rating in C#. If possible I would also like to retrieve the numbers for each component (Graphics, RAM etc.)
这可能吗?
推荐答案每次用户通过控制面板计算Windows体验等级时,系统都会在%Windows%\ Performance \ WinSAT \中创建一个新文件.数据存储\
Every time the user goes through control panel to calculate the Windows Experience Rating, the system creates a new file in %Windows%\Performance\WinSAT\DataStore\
您需要查找最新的文件(它们的名称以最重要的日期开头,因此查找最新的文件很简单).
You need to find the most recent file (they are named with the most significant date first, so finding the latest file is trivial).
这些文件是xml文件,易于使用XmlReader或其他xml解析器进行解析.
These files are xml files and are easy to parse with XmlReader or other xml parser.
您感兴趣的部分是 WinSAT \ WinSPR ,并且在一个部分中包含所有分数.例如
The section you are interested in is WinSAT\WinSPR and contains all the scores in a single section. E.g.
<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> ...更多推荐
检索Windows体验等级
发布评论