It is currently March 29th, 2024, 6:53 am

Get Rainmeter to show its own version number

Get help with creating, editing & fixing problems with skins
jn_meter
Posts: 136
Joined: December 27th, 2016, 12:04 pm

Get Rainmeter to show its own version number

Post by jn_meter »

Surely there is some measure for Rainmeter's own version - yes? I can't find it (in the docs or in this forum).
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get Rainmeter to show its own version number

Post by jsmorley »

jn_meter wrote: August 20th, 2020, 10:11 pm Surely there is some measure for Rainmeter's own version - yes? I can't find it (in the docs or in this forum).
No, there is no easy way to display that in a skin. It is available in the About / Version dialog from the Rainmeter context menu.
jn_meter
Posts: 136
Joined: December 27th, 2016, 12:04 pm

Re: Get Rainmeter to show its own version number

Post by jn_meter »

Thanks for the reply. A sad state of affairs and one where Rainmeter is bested by Conky.

Is there any reasonably direct way to get the version from within a skin? I had a look at the registry and the ini file but neither seems to contain the version number.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get Rainmeter to show its own version number

Post by jsmorley »

jn_meter wrote: August 20th, 2020, 10:24 pm Thanks for the reply. A sad state of affairs and one where Rainmeter is bested by Conky.

Is there any reasonably direct way to get the version from within a skin? I had a look at the registry and the ini file but neither seems to contain the version number.
Nope. You would need some external utility that can read and output the "properties" of Rainmeter.exe, then use RunCommand to get the value. I don't know of a utility that would do that right off the top of my head, but I'm certain there is one.


1.jpg
You do not have the required permissions to view the files attached to this post.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Get Rainmeter to show its own version number

Post by mak_kawa »

Hi jn_meter

I got the version number of Rainmeter.exe by following powershell command line.

Code: Select all

powershell -Command "(dir 'c:\Program files\Rainmeter\Rainmeter.exe').VersionInfo.FileVersion"
Output is "4.4.0.3398". So you can also get it within a Rainmeter skin using RunCommand plugin, maybe.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get Rainmeter to show its own version number

Post by jsmorley »

mak_kawa wrote: August 20th, 2020, 10:52 pm Hi jn_meter

I got the version number of Rainmeter.exe by following powershell command line.

Code: Select all

powershell -Command "(dir 'c:\Program files\Rainmeter\Rainmeter.exe').VersionInfo.FileVersion"
Output is "4.4.0.3398". So you can also get it within a Rainmeter skin using RunCommand plugin, maybe.
There you go... Good job.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get Rainmeter to show its own version number

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureGetVersion "Run"]

[Variables]

[MeasureGetVersion]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=-Command "(dir 'c:\Program files\Rainmeter\Rainmeter.exe').VersionInfo.FileVersion"
OutputType=ANSI
State=Hide

[MeterVersion]
Meter=String
MeasureName=MeasureGetVersion
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Get Rainmeter to show its own version number

Post by mak_kawa »

Hi jsmorley

You did it before I finished... :-)
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Get Rainmeter to show its own version number

Post by mak_kawa »

Hi all

How about Rainmeter version-check skin like this? A part of this code is of course after jsmorley.
I am not sure whether such skin is relevant or not. And also not confident about IfConditions. But anyway...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureGetVersion "Run"]

[Variables]
VersionStatus=""

[MeasureGetVersion]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=-Command "(dir 'c:\Program files\Rainmeter\Rainmeter.exe').VersionInfo.FileVersion"
OutputType=ANSI
State=Hide

[MeasureGetRevision]
Measure=String
String=[MeasureGetVersion]
RegExpSubstitute=1
Substitute="^.*\.(\d{4})$":"\1"
DynamicVariables=1

[GetCurrentRainmeterRevision]
Measure=WebParser
URL=https://docs.rainmeter.net/history/
RegExp=(?siU).*<h2 id="4\.4">Rainmeter 4\.4</h2>.*Revision (.*)</h3>.*<h2 id="4\.3">Rainmeter 4\.3</h2>.*Revision (.*)</h3>.*
FinishAction=[!EnableMeasure CheckRevisions]
UpdateRate=-1

[CurrentRevision44]
Measure=WebParser
URL=[GetCurrentRainmeterRevision]
StringIndex=1

[CurrentRevision43]
Measure=WebParser
URL=[GetCurrentRainmeterRevision]
StringIndex=2

[CheckRevisions]
Measure=Calc
Formula=[MeasureGetRevision]
IfCondition=CheckRevisions<[CurrentRevision43]
IfTrueAction=[!SetVariable VersionStatus "Your Rainmeter is 4.3 not latest, or older version"][!SetOption MeterVersionStatus FontColor 255,0,0,255]
IfCondition2=(CheckRevisions>[CurrentRevision43]) && (CheckRevisions<[CurrentRevision44])
IfTrueAction2=[!SetVariable VersionStatus "Your Rainmeter is 4.4Beta, but not latest"]
IfCondition3=CheckRevisions=[CurrentRevision43]
IfTrueAction3=[!SetVariable VersionStatus "Your Rainmeter 4.3 is up-to-date"][!SetOption MeterVersionStatus FontColor 0,255,0,255]
IfCondition4=CheckRevisions=[CurrentRevision44]
IfTrueAction4=[!SetVariable VersionStatus "Your Rainmeter is latest 4.4Beta"][!SetOption MeterVersionStatus FontColor 0,255,255,255]
Disabled=1
DynamicVariables=1

[MeterVersion]
Meter=String
MeasureName=MeasureGetVersion
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
X=5
Y=5
Text=Rainmeter %1
AntiAlias=1

[MeterVersionStatus]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
StringStyle=BoldItalic
SolidColor=47,47,47,255
Padding=5,5,5,5
X=5
Y=25
Text=#VersionStatus#
AntiAlias=1
DynamicVariables=1
Ps.: Though needless to say, version-check in this skin deeply depends on the structure of Rainmeter's version history page. So at least, when Rainmeter version went ahead, for example, 4.4 became to the official version and 4.5beta was released, this skin is not valid anymore, and must be modified (a bit?!).
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Get Rainmeter to show its own version number

Post by mak_kawa »

My quick sample skin with illustro appearance showing installed Rainmeter version and current\latest Rainmeter version(revision).
Untitled.png
You do not have the required permissions to view the files attached to this post.