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"
Code: Select all
"LeftMouseDoubleClickAction"
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
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.
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.
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.