It is currently April 19th, 2024, 7:35 pm

plugin to get version info from application

Share and get help with Plugins and Addons
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: plugin to get version info from application

Post by rbriddickk84 »

Uhm, yes, first of all, thank you for the time and energy to explained that to me! :)

Now i will take a few days to understand those lines :D

(it's harder to me, because my native language isn't English)

But that's why you are a Dev, and i am still just a user :D :D :D
(okay, on some level i am also a developer, but just only on a tiny level :D )
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: plugin to get version info from application

Post by jsmorley »

rbriddickk84 wrote:Uhm, yes, first of all, thank you for the time and energy to explained that to me! :)

Now i will take a few days to understand those lines :D

(it's harder to me, because my native language isn't English)

But that's why you are a Dev, and i am still just a user :D :D :D
(okay, on some level i am also a developer, but just only on a tiny level :D )
I'm a drunkard....
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: plugin to get version info from application

Post by rbriddickk84 »

Well.... then you are more badass, then i thought :D
A drunkard, and have this level of knowledge... Respect! :) :beer:
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: plugin to get version info from application

Post by Youkai1977 »

jsmorley wrote: November 26th, 2014, 7:50 pm There isn't a plugin for that, but you can use the little sigcheck.exe utility from Microsoft and the RunCommand plugin for Rainmeter to get that info:

sigcheck.exe from Microsoft

Note that you need to run sigcheck.exe one time manually, to agree to the licence terms.

Everything you need is included in the .rmskin. Just install it.
ProgramInfo_1.0.rmskin

Code: Select all

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

[GetProgramInfo]
Measure=Plugin
Plugin=RunCommand
Program=""#@#Addons\sigcheck.exe" "C:\Program Files\Rainmeter\Rainmeter.exe""
State=Hide
OutputType=ANSI
FinishAction=[!ShowMeter MeterProductVersion]

[GetProgramName]
Measure=String
String=[GetProgramInfo]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?siU)^.*Product:\t(.*)\n.*$":"\1","#CRLF#":""

[GetProgramVersion]
Measure=String
String=[GetProgramInfo]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?siU)^.*Prod version:\t(.*)\n.*$":"\1","#CRLF#":""

[MeterProductVersion]
Meter=String
FontSize=13
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Program Name: [GetProgramName]#CRLF#Version: [GetProgramVersion]
Hidden=1
DynamicVariables=1
sigcheck.exe output will be:

Code: Select all


Sigcheck v2.1 - File version and signature viewer
Copyright (C) 2004-2014 Mark Russinovich
Sysinternals - www.sysinternals.com

c:\program files\rainmeter\Rainmeter.exe:
	Verified:	Signed
	Signing date:	12:04 PM 11/21/2014
	Publisher:	Open Source Developer
	Description:	n/a
	Product:	Rainmeter
	Prod version:	3.2.0.2343 (64-bit)
	File version:	3.2.0.2343
	MachineType:	64-bit
2014-11-26_145031.jpg
The thread is a bit older, but maybe still interesting in 2021.
By chance I came across this thread because I was looking for something similar.
Well, I didn't want to believe that there is no way to read the version of Rainmeter WITHOUT auxiliary programs.
And I found something in my registry.
It will probably only work if you use the "installed" version of Rainmeter and not a portable version. But at least...

Here is the registry path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Rainmeter

Here is an example skin:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[MeasureRMVersion]
Measure=REGISTRY
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Rainmeter
RegValue=DisplayVersion
UpdateDivider=-1

[MeterBackground]
Meter=IMAGE
SolidColor=255,255,255,255
W=100
H=30
X=0
Y=0
UpdateDivider=-1

[MeterRMVersion]
Meter=STRING
Text=[MeasureRMVersion]
FontFace=Segoe UI
FontColor=0,0,0,200
FontWeight=600
FontSize=10
AntiAlias=1
X=8
Y=8
DynamicVariables=1
UpdateDivider=-1

You do not have the required permissions to view the files attached to this post.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: plugin to get version info from application

Post by SilverAzide »

You can also do this with a RunCommand measure using Powershell. For example:

Code: Select all

Measure=Plugin
Plugin=RunCommand
Program=powershell.exe
Parameter="-NoProfile -ExecutionPolicy Bypass -NonInteractive -Command "[System.Diagnostics.FileVersionInfo]::GetVersionInfo('C:\Program Files\Rainmeter\Rainmeter.exe').FileVersion""
OutputType=ANSI
State=Hide
If you want the full product version, use [System.Diagnostics.FileVersionInfo]::GetVersionInfo('C:\Program Files\Rainmeter\Rainmeter.exe').ProductVersion...

Here's all the members of the FileVersionInfo class:
[System.Diagnostics.FileVersionInfo]::GetVersionInfo('C:\Program Files\Rainmeter\Rainmeter.exe') | Format-List

Code: Select all

OriginalFilename  : Rainmeter.exe
FileDescription   : Rainmeter desktop customization tool
ProductName       : Rainmeter
Comments          :
CompanyName       : Rainmeter
FileName          : C:\Program Files\Rainmeter\Rainmeter.exe
FileVersion       : 4.4.0.3412
ProductVersion    : 4.4.0.3412 (64-bit)
IsDebug           : False
IsPatched         : False
IsPreRelease      : False
IsPrivateBuild    : False
IsSpecialBuild    : False
Language          : English (United States)
LegalCopyright    : © 2019 Rainmeter Team
LegalTrademarks   :
PrivateBuild      :
SpecialBuild      :
FileVersionRaw    : 4.4.0.3412
ProductVersionRaw : 4.4.0.3412
Gadgets Wiki GitHub More Gadgets...