jinyue115 Posted August 2, 2010 Share Posted August 2, 2010 How to get the value of Window Experience Index using AutoIT? Pls view the attachments below . The Windows Experience index is 1.0 I want to do "if index >3.0 then ..." but i dont know how to get the value . Thanks for reading. Link to comment Share on other sites More sharing options...
DarkAngel Posted August 2, 2010 Share Posted August 2, 2010 (edited) How to get the value of Window Experience Index using AutoIT? Pls view the attachments below . The Windows Experience index is 1.0 I want to do "if index >3.0 then ..." but i dont know how to get the value . Thanks for reading. The individual and cumulative datascores of the WEI is stored here in XML format. %systemroot%\Windows\Performance\WinSAT\DataStore\ If u can fileopen it and fileread the contents till a particular parameter is met (in this case the WEI) and then store it in a variable , u can use that varible in your "if ... else " staments. its a xml file so it wont be difficult to get the data between the <WinSPR> <SystemScore> p </SystemScore> <MemoryScore> q </MemoryScore> <CpuScore> r </CpuScore> <CPUSubAggScore> s </CPUSubAggScore> <VideoEncodeScore> t </VideoEncodeScore> <GraphicsScore> u </GraphicsScore> <GamingScore> v </GamingScore> <DiskScore> w </DiskScore> . . . . </WinSPR> That will be around the 13th line of the xml file i guess. Hope this helps. Edited August 2, 2010 by DarkAngel Link to comment Share on other sites More sharing options...
jinyue115 Posted August 2, 2010 Author Share Posted August 2, 2010 Thank you ! Link to comment Share on other sites More sharing options...
jinyue115 Posted August 2, 2010 Author Share Posted August 2, 2010 Is there got any easy ways to check that value ? Link to comment Share on other sites More sharing options...
mdwerne Posted August 2, 2010 Share Posted August 2, 2010 (edited) Is there got any easy ways to check that value ? Here is another way...not necessarily easier. All depends on how good your WMI -> AutoIt skillz are. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_WinSAT",,48) For Each objItem in colItems Wscript.Echo "Win32_WinSAT instance" Wscript.Echo "-----------------------------------" Wscript.Echo "CPUScore: " & objItem.CPUScore Wscript.Echo "D3DScore: " & objItem.D3DScore Wscript.Echo "DiskScore: " & objItem.DiskScore Wscript.Echo "GraphicsScore: " & objItem.GraphicsScore Wscript.Echo "MemoryScore: " & objItem.MemoryScore Wscript.Echo "TimeTaken: " & objItem.TimeTaken Wscript.Echo "WinSATAssessmentState: " & objItem.WinSATAssessmentState Wscript.Echo "WinSPRLevel: " & objItem.WinSPRLevel Next Hope this helps, -Mike Edited August 2, 2010 by mdwerne Link to comment Share on other sites More sharing options...
jinyue115 Posted August 3, 2010 Author Share Posted August 3, 2010 Here is another way...not necessarily easier. All depends on how good your WMI -> AutoIt skillz are. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_WinSAT",,48) For Each objItem in colItems Wscript.Echo "Win32_WinSAT instance" Wscript.Echo "-----------------------------------" Wscript.Echo "CPUScore: " & objItem.CPUScore Wscript.Echo "D3DScore: " & objItem.D3DScore Wscript.Echo "DiskScore: " & objItem.DiskScore Wscript.Echo "GraphicsScore: " & objItem.GraphicsScore Wscript.Echo "MemoryScore: " & objItem.MemoryScore Wscript.Echo "TimeTaken: " & objItem.TimeTaken Wscript.Echo "WinSATAssessmentState: " & objItem.WinSATAssessmentState Wscript.Echo "WinSPRLevel: " & objItem.WinSPRLevel Next Hope this helps, -Mike Thank you ! Will study these codes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now