It is currently October 17th, 2018, 8:32 am

Specific Windows version

Tips and Tricks from the Rainmeter Community
User avatar
jsmorley
Developer
Posts: 18088
Joined: April 19th, 2009, 11:02 pm
Location: Mt. Vernon, Virginia, USA

Specific Windows version

jsmorley » May 15th, 2018, 1:37 pm

With the new UsageMonitor plugin, it can be important to know what specific build (version) of Windows is running. This is because some of the features, like GPU, VRAM and Network counters, were only added to perfmon in the Fall Creators Update of Windows 10, version 1709.

To know this you can use a Registry measure:

Code: Select all

[MeasureVersion]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=CurrentBuild
UpdateDivider=-1
And simply use IfCondition with <> and the value.
Windows 10 (1803) 17134
Windows 10 (1709) 16299
Windows 10 (1703) 15063
Windows 10 (1607) 14393
Windows 10 (1511) 10586
Windows 10 10240
Windows 8.1 9600
Windows 8 9200
Windows 7 SP1 7601
Windows 7 7600


If the machine is running an Insider Preview version, the number will be some unknown value greater than 17134.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureVersion]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=CurrentBuild
UpdateDivider=-1
DynamicVariables=1
IfCondition=[MeasureVersion:]=17134
IfTrueAction=[!SetOption MeterVersion InlinePattern "Windows 10 \(1803\)"]
IfCondition2=[MeasureVersion:]=16299
IfTrueAction2=[!SetOption MeterVersion InlinePattern "Windows 10 \(1709\)"]
IfCondition3=[MeasureVersion:]=15063
IfTrueAction3=[!SetOption MeterVersion InlinePattern "Windows 10 \(1703\)"]
IfCondition4=[MeasureVersion:]=14393
IfTrueAction4=[!SetOption MeterVersion InlinePattern "Windows 10 \(1607\)"]
IfCondition5=[MeasureVersion:]=10586
IfTrueAction5=[!SetOption MeterVersion InlinePattern "Windows 10 \(1511\)"]
IfCondition6=[MeasureVersion:]=10240
IfTrueAction6=[!SetOption MeterVersion InlinePattern "Windows 10"]
IfCondition7=[MeasureVersion:]=9600
IfTrueAction7=[!SetOption MeterVersion InlinePattern "Windows 8.1"]
IfCondition8=[MeasureVersion:]=9200
IfTrueAction8=[!SetOption MeterVersion InlinePattern "Windows 8"]
IfCondition9=[MeasureVersion:]=7601
IfTrueAction9=[!SetOption MeterVersion InlinePattern "Windows 7 SP1"]
IfCondition10=[MeasureVersion:]=7600
IfTrueAction10=[!SetOption MeterVersion InlinePattern "Windows 7"]
IfCondition11=[MeasureVersion:]>17134
IfTrueAction11=[!SetOption MeterVersion InlinePattern "Windows 10 Insider"]

[MeterVersion]
Meter=String
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
InlineSetting=Weight | 700
Text=Windows 10 Insider#CRLF#Windows 10 (1803)#CRLF#Windows 10 (1709)#CRLF#Windows 10 (1703)#CRLF#Windows 10 (1607)#CRLF#Windows 10 (1511)#CRLF#Windows 10#CRLF#Windows 8.1#CRLF#Windows 8#CRLF#Windows 7 SP1#CRLF#Windows 7
1.jpg
You do not have the required permissions to view the files attached to this post.