I've found some places where I can get BIOS Release Date, but I'm not sure how to pull it. Not sure of commands or if it is possible.
Msinfo.exe
HWiNFO
C:\Users\Dan>wmic bios get ReleaseDate
ReleaseDate
20240327000000.000000+000
I am terrible with RegEx by the way.
I am trying to have an output like
2024/03/27
Any help or wisdom is much appreciated.
It is currently September 16th, 2024, 7:15 pm
Get BIOS Release Date and format
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
Get BIOS Release Date and format
You do not have the required permissions to view the files attached to this post.
Last edited by Sh8dyDan on July 20th, 2024, 9:55 pm, edited 2 times in total.
-
- Posts: 34
- Joined: January 25th, 2023, 2:56 am
Re: Get BIOS Release Date and format
This measure can get the bios version
Code: Select all
[MeasureBIOSVersion]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SYSTEM\HardwareConfig\Current
RegValue=BIOSReleaseDate
UpdateDivider=-1
-
- Rainmeter Sage
- Posts: 16549
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Get BIOS Release Date and format
You can try adding the following measure to your code (I assume you have a code, right?):
When ran, this measure returns the needed date, using this method:
Please let us know if you couldn't get this working.
Code: Select all
[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=wmic bios get ReleaseDate
State=Hide
OutputType=ANSI
RegExpSubstitute=1
Substitute=".*\n(\d{4})(\d{2})(\d{2}).*\n.*":"\1.\2.\3"
Note that in order to get the above measure executed, you have to run it, which can be done by a proper !CommandMeasure bang. Add such a bang for instance to the OnRefreshAction option of the [Rainmeter] section: OnRefreshAction=[!CommandMeasure "MeasureRun" "Run"]. By this you get the measure executed right after refreshing / loading the skin. It takes a few seconds to get it executed, but make sure you're allowing the skin to increase its size, to can show up the result. You can do this by adding a DynamicWindowSize=1 option to the same [Rainmeter] section.
Please let us know if you couldn't get this working.
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
Re: Get BIOS Release Date and format
Thank you very much.
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
Re: Get BIOS Release Date and format
To both of you
-
- Rainmeter Sage
- Posts: 16549
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Get BIOS Release Date and format
Did you get it working? Any of the posted two methods?
-
- Developer
- Posts: 2730
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: [SOLVED] Get BIOS Release Date and format [SOLVED]
I just want to remind everyone that the wmic command is now deprecated by Windows, and may not be installed by default on Windows.
I believe it will be available as a "feature on demand" for the time being, meaning you may have to manually install it.
https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features
-Brian
PS - That link provides a list of other deprecated items like WordPad, VBScript, etc.
I believe it will be available as a "feature on demand" for the time being, meaning you may have to manually install it.
https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features
-Brian
PS - That link provides a list of other deprecated items like WordPad, VBScript, etc.
-
- Posts: 588
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: [SOLVED] Get BIOS Release Date and format [SOLVED]
So, the üpwershell replace ment for the wmic-command would be:
The format is slightly different, but that should not be a big problem:
Code: Select all
Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property ReleaseDate
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16549
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [SOLVED] Get BIOS Release Date and format [SOLVED]
Alright, on my side wmic is still working, but if this is the case, there might be computers on which it doesn't work (I assume). According to ikarus1969's post:
to avoid the issue, the [MeasureRun] measure should be rewritten this way, for instance:ikarus1969 wrote: ↑July 20th, 2024, 7:15 am So, the üpwershell replace ment for the wmic-command would be:Code: Select all
Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property ReleaseDate
Code: Select all
[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property ReleaseDate
State=Hide
OutputType=ANSI
RegExpSubstitute=1
Substitute="\n":"",".*(\d{4})-(\d{2})-(\d{2}).*":"\1.\2.\3"
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
Re: Get BIOS Release Date and format
I did get it working, thank you.
----------
Thanks to Brian for pointing out that the wmic command is now deprecated by Windows. Also thank to ikarus1969 for new command using CimInstance in PowerShell.
I'm afraid I'm going to have to ask for help from you guys with some RegEx.
I'm trying but struggling with RegEx. Is RegEx101.com an option and if so what settings would select to generate an output for Rainmeter
OUTPUT STRING:
Code: Select all
ReleaseDate
-----------
3/26/2024 8:00:00 PM
Code: Select all
2024/03/26
Code: Select all
Caption
-------
Microsoft Windows 11 Pro
Code: Select all
Microsoft Windows 11 Pro