It is currently April 27th, 2024, 6:39 am

How to execute the "Reboot to UEFI Bios" command with Rainmeter

Get help with creating, editing & fixing problems with skins
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Youkai1977 »

Hello everyone,
after a long period of silence on my part, I'm getting in touch again with a small problem. I would like to use the command:

Code: Select all

"C:\Windows\System32\shutdown.exe /r /fw /t 0"
into my skin so that I can use it via:

Code: Select all

"LeftMouseDoubleClickAction"
and my PC (Win11 23H2) reboots into the UEFI bios.

Currently my code looks like this:

FILE: useraccount.ini -> LINE 250 - 262 (261)

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Metadata]
Name=UAC (User Account Control) (Speech Function)
Author=Youkai1977
Version=03.24 <> 04.11.2023
Information=This Meter is a Part of MaRS - 2023 Skin Package
License=Creative Commons Attribution-Non-Commercial-Share Alike 4.0

;==================================================
;=== VARIABLES & STYLES ===========================
;==================================================

[Variables]
@include=useraccountdata.inc

;==============================================================
;=== VOICE OUTPUT =============================================
;==============================================================
;===                                                         ==
;=== FOR MORE INFO TO SPEECH-PLUGIN                          ==
;=== https://forum.rainmeter.net/viewtopic.php?f=127&t=31161 ==
;===                                                         ==
;==============================================================

[VoiceOutput]
Measure=PLUGIN
Plugin=Speech
Name=#VoiceName#
;Index=#IndexName# 
;Gender=#VoiceGender#
Debug=#DebugModus#
Volume=#VoiceVolume#
Rate=#SpeechRate#
UpdateDivider=-1

;==================================================
;=== MEASURES UAC (User Acc Info) & SYSTEM ========
;==================================================

;=== MEASURES UAC LOGIN-TIME etc. =================

[mUSER]
Measure=PLUGIN
Plugin=SysInfo
SysInfoType=USER_NAME
UpdateDivider=-1

[mAccTime]
Measure=PLUGIN
Plugin=SysInfo
SysInfoType=USER_LOGONTIME
UpdateDivider=-1

[mCurTime]
Measure=TIME

[mSysUptime]
Measure=UPTIME
Format=%4!02i!:%3!02i!:%2!02i!:%1!02i!

[mSysReStartTime]
Measure=Time
TimeStamp=([mCurTime:]-[mSysUptime:])
Format=%a [\x00B7] %d.%m.%Y [\x00B7] %H:%M:%S
TimeStampLocale=#TSL#
FormatLocale=#FL#
;Substitute="Mon":"MON","Tue":"TUE","Wed":"WED","Thu":"THU","Fri":"FRI","Sat":"SAT","Sun":"SUN","Mo":"MO","Di":"DI","Mi":"MI","Do":"DO","Fr":"FR","Sa":"SA","So":"SO"
DynamicVariables=1
UpdateDivider=-1

[mAccountLogInTime]
Measure=TIME
TimeStamp=[mAccTime]
Format=%a [\x00B7] %d.%m.%Y [\x00B7] %H:%M:%S
TimeStampLocale=#TSL#
FormatLocale=#FL#
;Substitute="Mon":"MON","Tue":"TUE","Wed":"WED","Thu":"THU","Fri":"FRI","Sat":"SAT","Sun":"SUN","Mo":"MO","Di":"DI","Mi":"MI","Do":"DO","Fr":"FR","Sa":"SA","So":"SO"
DynamicVariables=1
UpdateDivider=-1

[mLogInDuration]
Measure=UPTIME
Group=Account
SecondsValue=([mCurTime:]-[mAccTime:])
Format=%4!02i!:%3!02i!:%2!02i!:%1!02i!
DynamicVariables=1

;=== MEASURES SYSTEM INFORMATION ==================

[mOSNAME]
Measure=REGISTRY
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=ProductName
UpdateDivider=-1

[mOSBITS]
Measure=PLUGIN
Plugin=SysInfo
SysInfoType=OS_BITS
UpdateDivider=-1
RegExpSubstitute=1
Substitute="(^\s+|\s+$)":"","^(\S{1,3}).*$":"\1-bit","(^$|^0$)":"N/A-bit"

[mOSVERSION]
Measure=REGISTRY
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=DisplayVersion
UpdateDivider=-1

[mOSBUILD]
Measure=REGISTRY
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=CurrentBuild
UpdateDivider=-1

[mOSUBR]
Measure=REGISTRY
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion
RegValue=UBR
UpdateDivider=-1

[mOSIDLE]
Measure=PLUGIN
Plugin=SysInfo
SysInfoType=IDLE_TIME
IfCondition=[mOSIDLE] = 0
IfTrueAction=[!SetOption OSIdle InlineSetting "Color | #Color2##Alpha1#"][!UpdateMeter OSIdle][!Redraw]
IfFalseAction=[!SetOption OSIdle InlineSetting "Color | #Color4##Alpha1#"][!UpdateMeter OSIdle][!Redraw]
DynamicVariables=1

[mOSIDLETime]
Measure=TIME
TimeStamp=[mOSIDLE]
Format=%H:%M:%S
TimeStampLocale=#TSL#
FormatLocale=#FL#
DynamicVariables=1

;=== MEASURES RM INFORMATION ==================

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

[mRMWEB]
Measure=WEBPARSER
URL=https://www.rainmeter.net
RegExp=(?siU)<h4>(.*)</h4>.*<p class="d-flex">(.*)</p>
Substitute=" - ":"","Release":""
UpdateRate=12000
Debug=1
FinishAction=[!EnableMeasure mRMFINALDATEFORMAT][!UpdateMeasure mRMFINALDATEFORMAT][!UpdateMeter RMWEBBuilds][!Redraw]

[mRMFINALVERSION]
Measure=WEBPARSER
URL=[mRMWEB]
StringIndex=1
Substitute=" - ":"","Release":""

[mRMFINALDATE]
Measure=WEBPARSER
URL=[mRMWEB]
StringIndex=2

[mRMFINALDATEFORMAT]
Measure=TIME
TimeStamp=[mRMFINALDATE]
TimeStampFormat=%B %d, %Y
TimeStampLocale=en-US
FormatLocale=#FL#
Format=%d.%m.%Y
DynamicVariables=1
UpdateDivider=-1
Disabled=1

;##################################################
;##################################################
;##################################################
;##################################################
;##################################################
;##################################################

;==================================================
;=== BTNs USER LOG OUT & SYSTEM CONTROL ===========
;==================================================

;=== BTN USER LOG OUT =============================

[BTNLogOFF]
Meter=BUTTON
ButtonImage=#Images#logout.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=5
Y=0
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#LOGOUTBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=[shutdown.exe -l]
UpdateDivider=-1
;Container=CONTAINER_UAC

;=== BTN SYSTEM LOCK ==============================

[BTNSysLOG]
Meter=BUTTON
ButtonImage=#Images#log.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=44r
Y=r
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#SYSLOGBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=[rundll32.exe user32.dll LockWorkStation]
UpdateDivider=-1
;Container=CONTAINER_UAC

;=== BTN SYSTEM RESTART ===========================

[BTNSysRES]
Meter=BUTTON
ButtonImage=#Images#restart.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=44r
Y=r
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#SYSRESBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=[shutdown.exe -r -t 00]
UpdateDivider=-1
;Container=CONTAINER_UAC

;=== BTN SYSTEM RESTART TO UEFI-BIOS ==============

[BTNSysREStoUEFI]
Meter=BUTTON
ButtonImage=#Images#restouefi.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=44r
Y=r
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#SYSRTBBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=["#RTBLink#ResToUEFI"]
UpdateDivider=-1
;Container=CONTAINER_UAC

;=== BTN SYSTEM SHUTDOWN ==========================

[BTNSysSHD]
Meter=BUTTON
ButtonImage=#Images#shutdown.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=44r
Y=r
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#SYSSHDBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=[shutdown.exe -s -t 00]
UpdateDivider=-1
;Container=CONTAINER_UAC

;==================================================
;=== HEAD UAC & SOFTWARE / OS MONITOR =============
;==================================================

;=== CONTAINER UAC ================================

[CONTAINER_UAC]
Meter=IMAGE
SolidColor=#Color1##Alpha1#
W=#W#
H=#H#
X=0
Y=37
UpdateDivider=-1

;=== METER NAME ===================================

[METERNAME]
Meter=STRING
MeterStyle=StMeterName
X=0
Y=0
MouseOverAction=[!SetOption METERNAME FontColor "#Color2##Alpha1#"][!UpdateMeter METERNAME][!Redraw]
MouseLeaveAction=[!SetOption METERNAME FontColor "#Color1##Alpha1#"][!UpdateMeter METERNAME][!Redraw]
LeftMouseDoubleClickAction=[SHELL:::{60632754-c523-4b62-b45c-4172da012619}]

;==================================================
;=== CURRENT LOG IN USER AVATAR & INFO ============
;==================================================

;=== USER PICTURE FRAME & CONTAINER ===============

[FRAME_UPE]
Meter=SHAPE
X=0
Y=60
Shape=Path MyPath | StrokeWidth 2 | Stroke Color #Color7##Alpha1# | Fill Color #Color0##Alpha1# | Offset 1,0
MyPath=4,0 | LineTo 74,0 | LineTo 78,4 | LineTo 78,74 | LineTo 74,78 | LineTo 4,78 | LineTo 0,74 | LineTo 0,4 | ClosePath 1
MouseOverAction=[!SetOption #CURRENTSECTION# Shape "Path MyPath | StrokeWidth 2 | Stroke Color #Color2##Alpha1# | Fill Color #Color0##Alpha1# | Offset 1,0"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# Shape "Path MyPath | StrokeWidth 2 | Stroke Color #Color1##Alpha1# | Fill Color #Color0##Alpha1# | Offset 1,0"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseDoubleClickAction=[SHELL:::{60632754-c523-4b62-b45c-4172da012619}]
UpdateDivider=-1

[CONTAINER_UPE]
Meter=SHAPE
X=r
Y=r
Shape=Path MyPath | StrokeWidth 0 
MyPath=6,2 | LineTo 74,2 | LineTo 77,5 | LineTo 77,73 | LineTo 74,76 | LineTo 6,76 | LineTo 3,73 | LineTo 3,5 | ClosePath 1
UpdateDivider=-1

;=== USER AVATAR ==================================

[UPE]
Meter=IMAGE
ImageName=#UserAva#
ImageTint=#Color3##Alpha1#
ImageAlpha=#Alpha1#
Greyscale=1
AntiAlias=1
X=0
Y=0
W=78
H=78
UpdateDivider=-1
Container=CONTAINER_UPE

;=== USER LOG-IN TIME & DURATION ==================

[UserLogIN]
Meter=STRING
MeterStyle=StMASTER | StLOGIN
X=90
Y=22

[UserLogINDUR]
Meter=STRING
MeterStyle=StMASTER | StLOGINDUR
X=282r
Y=r

;=== SYSTEM ReSTART TIME & DURATION ===============

[SystemReSTART]
Meter=STRING
MeterStyle=StMASTER | StReSTART
X=90
Y=50r

[SystemReSTARTDUR]
Meter=STRING
MeterStyle=StMASTER | StReSTARTDUR
X=282r
Y=r

;==================================================
;=== CURRENT SYSTEM SOFTWARE INFO =================
;==================================================

;=== CURRENT OS VERSION & IDLE TIME ===============

[OSVer]
Meter=STRING
MeterStyle=StMASTER | StOS
X=69r
Y=22
LeftMouseUpAction=[winver]

[OSIdle]
Meter=STRING
MeterStyle=StMASTER | StOSIDLE
X=439r
Y=r

;=== CURRENT RM BUILD SYSTEM & LATEST RM ON WEB ===

[RMSYSBuild]
Meter=STRING
MeterStyle=StMASTER | StRMSYS
X=-439r
Y=50r

[RMWEBBuilds]
Meter=STRING
MeterStyle=StMASTER | StRMWEB
X=439r
Y=r
MouseOverAction=[!SetOption RMWEBBuilds InlineSetting "Color | #Color2##Alpha1#"][!UpdateMeter RMWEBBuilds][!Redraw]
MouseLeaveAction=[!SetOption RMWEBBuilds InlineSetting "Color | #Color3##Alpha1#"][!UpdateMeter RMWEBBuilds][!Redraw]
LeftMouseDoubleClickAction=[https://www.rainmeter.net/]

FILE: useraccountdata.inc -> LINE 59

Code: Select all

[Variables]
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;***                                                                                                                                               ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;*** !!!!!!!!!!!!!!!!!!   DON`T CHANGE ANYTHING IN THIS FILE   !!!!!!!!!!!!!!!!!!!!!!!   Unless you know what you are doing :-) !!!!!!!!!!!!!!!!!! ******
;***                                                                                                                                               ******
;********************************************************************************************************************************************************
;********************************************************************************************************************************************************
;==================================================
;=== VARIABLES FONTFACE - SIZE - COLORS ===========
;==================================================
Images=#@#images\
FontFace=Segoe UI Variable
Width=300
Height=14
W=880
H=102
BigFont=600
SmallFont=300
FS1=12
FS2=8
Alpha0=1
Alpha1=255
Color0=0,0,0,
Color1=255,255,255,
Color2=253,193,0,
Color3=255,104,67,
Color4=0,196,0,
Color5=164,0,0,

;==================================================
;=== VARIABLES SPEECH PLUGIN (Sys-Control) ========
;==================================================
VoiceName=Microsoft Hedda Desktop
IndexName= 
VoiceGender=
DebugModus=0
VoiceVolume=100
SpeedRate=-2
LOGOUTBTNSpeech=Aktuellen Benutzer ausloggen
SYSLOGBTNSpeech=System sperren
SYSRESBTNSpeech=System neu starten
SYSRTBBTNSpeech=System ins UEFI BIOS neustarten
SYSSHDBTNSpeech=System runter fahren und auschalten

;==================================================
;=== VARIABLES USER ACCOUNT INFO ==================
;==================================================
UserAva=C:\Users\Public\AccountPictures\S-1-5-21-3080035435-3182894706-1904757505-1001\{5F37BE74-1B55-4AE5-A5B1-3BF5E6CB4203}-Image96.jpg
TSL=de-DE
FL=de-DE

;==================================================
;=== VARIABLES RESTART TO UEFI-BIOS BUTTON ========
;==================================================
RTBLink=#@#tools

;==================================================
;=== STYLE METER NAME =============================
;==================================================
[StMeterName]
Padding=0,-6,0,-5
SolidColor=#Color0##Alpha0#
FontColor=#Color1##Alpha1#
FontFace=#FontFace#
FontWeight=#BigFont#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
Text=UAC [\x00B7] SOFTWARE-INFO
UpdateDivider=-1
W=#W#
H=#H#
Container=CONTAINER_UAC

;==================================================
;=== STLYE MASTER FOR ALL FOLLOWING METER STYLES ==
;==================================================
[StMASTER]
Padding=0,-9,0,-3
SolidColor=#Color0##Alpha0#
FontColor=#Color1##Alpha1#
FontFace=#FontFace#
FontSize=#FS1#
StringCase=UPPER
AntiAlias=1
InlineSetting2=Size | #FS2#
InlinePattern2=^(.*)#CRLF#
DynamicVariables=1
Container=CONTAINER_UAC

;==================================================
;=== METER STYLES UAC (User Acc Info & Control) ===
;==================================================

;=== STYLE USER LOG IN TIME & DURATION ============

[StLOGIN]
Text=USER [mUSER] LOG-IN#CRLF#[mAccountLogInTime]
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#CRLF#(.*)
UpdateDivider=-1

[StLOGINDUR]
StringAlign=RIGHT
Text=DURATION#CRLF#[mLogInDuration]
InlineSetting=Color | #Color4##Alpha1#
InlinePattern=#CRLF#(.*)

;==================================================
;=== METER STYLES SYS (Software Info & Control) ===
;==================================================

;=== STYLE SYSTEM ReSTART TIME & DURATION =========

[StReSTART]
Text=SYSTEM ReSTART#CRLF#[mSysReStartTime]
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#CRLF#(.*)
UpdateDivider=-1

[StReSTARTDUR]
StringAlign=RIGHT
Text=DURATION#CRLF#[mSysUpTime]
InlineSetting=Color | #Color4##Alpha1#
InlinePattern=#CRLF#(.*)

;=== STYLE CURRENT OS VERSION & IDLE TIME =========

[StOS]
Text=CURRENT OS-BUILD#CRLF#[mOSNAME] [mOSBITS] [\x00B7] [mOSVERSION] [\x00B7] [mOSBUILD].[mOSUBR]
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#CRLF#(.*)
UpdateDivider=-1

[StOSIDLE]
StringAlign=RIGHT
Text=IDLE TIME#CRLF#[mOSIDLETime]
InlineSetting=Color | #Color2##Alpha1#
InlinePattern=#CRLF#(.*)

;=== STYLE CURRENT RAINMETER BUILD ================

[StRMSYS]
Text=CURRENT RAINMETER-BUILD#CRLF#[mRMSYSVERSION]
InlineSetting=Color | #Color3##Alpha1#
InlinePattern=#CRLF#(.*)
UpdateDivider=-1

[StRMWEB]
StringAlign=RIGHT
Text=RAINMETER-BUILD WEB#CRLF#[mRMFINALVERSION] [\x2022] [mRMFINALDATEFORMAT]
InlineSetting=Color | #Color3##Alpha1#
InlinePattern=#CRLF#(.*)
UpdateDivider=1
A created link is located in the main skin folder under "D:\Rainmeter\Skins\MaRS-2023\@Resources\tools"


where the line "59" from "useraccountdata.inc" refers to it.


I decided to go this way because this shortcut, which contains the command "C:\Windows\System32\shutdown.exe /r /fw /t 0", must be executed as administrator. This is stored in the Windows Desktop-Shortcut (#@#tools\ResToUEFI) itself.
"ResToUEFI" is the Name of the Windows Desktop-Shortcut

And since I don't know how to execute commands with Rainmeter as admin, I just decided to execute the said shortcut with "LeftMouseDoubleClickAction".


But when I press the button in my skin, nothing happens. There is also no error in the Rainmeter LOG file, so I don't know where my error lies. Or whether it's just another typical "Youkai" crude approach. :Whistle :?
In my defense, I have to say that for various reasons (family) I have done almost nothing with Rainmeter for the last 2 years, so I am currently pretty much out of the matter.
I no longer understand some of the skins I created back then. :o :oops:
I'll just say my menu-driven slideshow, where (I think) "balala" helped me back then. This is still in the code today as he had built it in as an idea/example back then.

Therefore, if someone here could help me find out what I'm doing wrong, that would be great.
- 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:
ZXCVBOT

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by ZXCVBOT »

You no longer need create shortcuts, your approach of using commands is easily achieved by doing something like this:

Code: Select all

[MeasureRebootToUEFI]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=(shutdown /r /fw /t 0)
You can use the command in Parameter Option: "Note: Care should be taken to properly "quote" commands with a path or parameters having spaces in values." - Source: https://docs.rainmeter.net/manual/plugins/runcommand/

Edit: Rewrote what I typed in earlier.

Just refer this to your meter.

Code: Select all

[BTNSysSHD]
Meter=BUTTON
ButtonImage=#Images#shutdown.png
SolidColor=#Color0##Alpha0#
AntiAlias=1
X=44r
Y=r
W=36
H=26
MouseOverAction=[!CommandMeasure VoiceOutput "#SYSSHDBTNSpeech#"]
MouseLeaveAction=[!CommandMeasure VoiceOutput ""]
LeftMouseDoubleClickAction=[!CommandMeasure MeasureRebootToUEFI "Run"]
UpdateDivider=-1
;Container=CONTAINER_UAC
PS: I tried and shutdown-ed my PC in middle of typing this :rolmfao:
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Yincognito »

Besides ZXCVBOT's suggestion, to run suff as an administrator, I believe either running Rainmeter itself as an administrator (as the parent process for whatever script you run) or running stuff from PowerShell as an administrator (I have a thread somewhere on the forum related to this, since I needed to force kill processes in my suite at that time) are the 2 possibilities. But then, if ZXCVBOT's method works for you, there would be no need for the above anyway.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by ZXCVBOT »

The above required no admin privileges. That being said, someone needs to run this, as my environment was not related to system in any manner, but is set in (windows) path.

Edit: Running Rainmeter as admin would be better if installed in a standard manner.
Alternatively (Much better way), you can do this:
  • Open Run (Standard one).
  • Type Shell:Startup.
  • Check if Rainmeter's shortcut is present.
  • Right-Click and click Properties - Compatibility.
  • Tick the box next to "Run this program as an administrator".
  • Click Apply-OK.
If you want to test immediately, exit Rainmeter - run Rainmeter as Administrator.
By this, whenever you start your PC, Rainmeter will already be running as Admin, by default.

PS: I have yet to learn how to run scripts as whole, so, if you require a script to elevate to admin status - for a particular script (not Rainmeter), I happen to have it in my PC. Just say so, I'll send it.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Youkai1977 »

@ZXCVBOT:

Thank you so much, your tip was exactly what I needed.
It worked straight away. :bow: :thumbup:


What 'Yincognito' wrote with the admin rights, I tried that directly afterwards with the 'shell:Startup' story.
Here, however, I noticed that Rainmeter, although it is in the autostart, does NOT start with Windows anymore.
I think I'll put it back and see if the 'Boot into UEFI' thing still works.

But the Measure and PowerShell story alone shows me that I urgently need to take a closer look at Rainmeter and its possibilities.
As I wrote yesterday, I'm currently totally out of the loop when it comes to Rainmeter.

But anyway, as a small thank you for the quick help, I have uploaded my UAC meter as a *.rmskin file. Maybe you or someone else is interested. :D
However, the button for the UEFI reboot contains the Gigabyte Aorus logo. The reason for this is that I currently have such a motherboard.
If someone uses my UAC meter and would like to have a different button here, don't be shy, let me know. ;-)

LG Youkai1977
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
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Yincognito »

Youkai1977 wrote: November 5th, 2023, 1:01 pmWhat 'Yincognito' wrote with the admin rights, I tried that directly afterwards with the 'shell:Startup' story.
Here, however, I noticed that Rainmeter, although it is in the autostart, does NOT start with Windows anymore.
No, I meant running Rainmeter as an admin via the Compatibility tab in Windows (EDIT: just saw what the 'shell:Startup' story was, I thought it was in your replies). But yeah, doing that has a few drawbacks indeed, so the PowerShell approach is the best choice, as you noticed. Luckily, in this particular case the method laid out by ZXCVBOT worked without having to run it as an admin, but in other cases (like mine with killing a process was) you cannot avoid it. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by ZXCVBOT »

Glad to hear that it worked Youkai1977. :welcome:

As for the Shell:Startup advice, just do this: Go to Rainmeter's root directory, create a shortcut for the rainmeter.exe, cut the shortcut and paste it in the startup directory.
It is the shortcut that opens it when your PC boots up, not the application in there.
(It would be like sending a man with no weapons in a gunfight; Application without dependencies.)
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Youkai1977 »

Thanks again for your feedback and ideas/suggestions.

I had to take a completely different approach to get Rainmeter to start with admin rights along with Windows. Because WITHOUT admin rights then my button to reboot into UEFI does NOT work.

I have read in a topic here in the forum that you have to give the "Rainmeter.exe" via right click, properties -> "Run as Administrator", and then start Rainmeter with Windows via task scheduling, if it otherwise does not want to start with assigned admin rights via the otherwise common as usual way via the autostart.
Well, I did that and it actually works perfectly. With this in mind, I think we can tick off my question/problem about my "Reboot to UEFI" button. :thumbup:
However, there is another problem for me now, concerning a plugin. Namely the "ImageSize.dll" for my slideshow. O.O

I have already commented on this here, in the corresponding topic on this plug-in: -> https://forum.rainmeter.net/viewtopic.php?p=219248#p219248
- 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
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Yincognito »

Youkai1977 wrote: November 6th, 2023, 10:10 amHowever, there is another problem for me now, concerning a plugin. Namely the "ImageSize.dll" for my slideshow. O.O

I have already commented on this here, in the corresponding topic on this plug-in: -> https://forum.rainmeter.net/viewtopic.php?p=219248#p219248
Just guessing here, but have you tried to use it with image files located in other paths? Maybe that's a "user" issue somewhere?
Anyway, in the meantime, till you get an answer, if any, I suppose getting an image size can be done in other ways as well: PowerShell, NirCmd tools, loading the image in an invisible Image meter, etc.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: How to execute the "Reboot to UEFI Bios" command with Rainmeter

Post by Youkai1977 »

@Yincognito:

Thank you very much for your feedback.
So the problem with the "ImageSize.dll" when I start Rainmeter via "Task Scheduler" seems to be bigger than I first thought.
Because it affects Rainmeter as a whole, not just said DLL file.
Yesterday, when using my PC, I noticed that when I start Rainmeter with Windows as described, Rainmeter starts 1a and also loads my various meters, but they seem to be in a kind of 'rigidity'. No matter what I click on, NOTHING happens.
So I have to quit Rainmeter COMPLETELY and then restart Rainmeter 'WITH ADMIN RIGHTS' (right mouse button 'Run as administrator').
Only then does Rainmeter run as usual and without problems.

I don't know if it's the combination of Win11 (23H2) with Rainmeter 4.5.18 that doesn't want to harmonize properly, or if it has to do with the task scheduling of how I currently start Rainmeter. I think it's pretty clear that this is the connection, because I didn't have the problems before. But to be honest, I'm not sure exactly where to start. I've hardly ever worked with task planning before and always have to get instructions from the Internet when I want to use it. And if then, as in my case now, despite the fact that I have followed the instructions EXACTLY, it still doesn't work, at least not in its entirety. Well, then even I'm at a loss. :confused: :???:
- 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: