Script to test Windows performance

December 2016


Issue


How i can use a script to access Windows? A script that work like the rating method in windows Vista and Seven?

Solution

  • Open a notepad
  • Copy the below script ;

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set colItems = objWMIService.ExecQuery("Select * From Win32_WinSAT") 
For Each objItem in colItems 
Select Case objItem.WinSATAssessmentState 
Case "0","3" 
msg = "Warning, tests did not well" 
Case "1" 
msg = "Results are available..." 
Case "2" 
msg = "Warning: Inconsistent results" 
Case "4" 
msg = "Warning invalid tests" 
End Select 
msg = msg + VBCRLF + "CPU: " & objItem.CPUScore 
msg = msg + VBCRLF + "Ram: " & objItem.MemoryScore 
msg = msg + VBCRLF + "Hard disk: " & objItem.DiskScore 
msg = msg + VBCRLF + "GPU: " & objItem.GraphicsScore 
msg = msg + VBCRLF + "Game performance: " & objItem.D3DScore 
msg = msg + VBCRLF + "Average rating: " & objItem.WinSPRLevel 
Wscript.Echo msg 
Next 
  • Save and named the notepad as "ShowWinSat.VBS"
  • Double click on the file to launch the rating

Related :

This document entitled « Script to test Windows performance » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.