It is currently April 27th, 2024, 1:35 pm

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

Get help with creating, editing & fixing problems with skins
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 7th, 2023, 7:33 amSo 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.
Right. All I'm saying is that if the problem is JUST that plugin (e.g. things are fine without it), then you can avoid using it since there are other ways to get the resolution of an image. If things are not fine when not using the plugin as well, then THAT would be a bigger problem.
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 »

I can't do without the plug-in itself (at least not yet). And I don't really want to. Unless there is something better, or even more secure.
Because I still use the slideshow that I used about 2 years ago here with 'balala', which helped me there. Or rather, it's still exactly the same. I have changed something in the slideshow since then (also because I just couldn't get to it). And so I need the 'ImageSize.dll'. Unless, as mentioned at the beginning, there is something better in the meantime.

However, I have noticed that in the end it is not only the 'ImageSize.dll' that causes problems when I start Rainmeter via task scheduling as described. The whole Rainmeter, or rather my skins/meter start but are not usable. If I click on something, it appears to be frozen. Spirch, it does not react.

But, I think I have found a solution. Because I have experimented a little with the task planning. And it seems to work with the following configuration (applies to Win11 Pro x64 23H2 - 226312506 under RM V4.5.18):

PREPARATION
1) In the installation path of Rainmeter of rainmeter.exe -> admin rights given
2) My Windows boots directly to the desktop WITHOUT password with admin rights (but it has always been like this for me, because I use PC alone)

TASK PLANNING
3) GENERAL TAB
a) Name of the task 'Rainmeter Autostart with admin rights'
b) Click -> Execute only if the user is logged in
c) Click -> Execute with highest privileges

4) TRIGGER TAB
a) Click -> Edit button
b) Start task -> On startup
c) Advanced settings -> Click -> Delay for 15 seconds (default is 30 seconds, can be changed manually)
d) Click -> Activated
e) Click -> Button 'OK'
NOTE: Before click OK-Button !!! Turn EVERYTHING ELSE off/deactivate in this tab !!!

5) ACTION TAB
a) Click -> 'Edit' button
b) Action -> Select 'Start program'
c) Click -> 'Browse' button'
d) Search for the installation path of Rainmeter and select 'rainmeter.exe' (example for me: C:\Program Files\Rainmeter\Rainmeter.exe)
e) Leave the fields 'Add arguments' and 'Start in' EMPTY
f) Click -> 'OK' button

6) TAB CONDITIONS
a) SELECT EVERYTHING except ...
b) ... 'Only start if the following network connection is available:'
c) Select 'Network' here
d) Click -> button 'OK'
NOTE: I need to select Network because my Rainmeter SKIN folder is located on my NAS home server. And if this connection is not (yet) established, it is of course clear that Rainmeter will complain or throw error messages in the LOG file.
If someone wants to start Rainmeter via task scheduling according to my instructions here, he must make sure to adjust the settings here according to his PC/network configuration

7) TAB SETTINGS
a) SELECT EVERYTHING except ...
b) ... Check the box -> 'Allow task execution on demand'
c) Check whether 'Do not start a new instance' is selected below
d) Click -> 'OK' button
NOTE: I don't know whether I actually need the checkmark under point 'b)'. But since it seems to work for me, I'll leave it as it is

8) TAB PROCESS
I have not set anything here, or that Windows would automatically do something for me. I also see 'disabled' in brackets next to 'History' in this tab

Finally, confirm the whole thing with the 'OK' button and the task is created.

When I restart or boot my PC now, Rainmeter starts as usual, as if it were in the autostart folder.
However, since I have the 15 second delay, the SlideShow remains dark during this time (probably because of the ImageSize.dll problem), and no buttons in my skins/meters that have a function in the form of executing Windows functions work.
Buttons which only have a shortcut task, e.g. to the firefox.exe, work immediately.

Then after 15 seconds, Rainmeter comes out of its stupor and everything, including my SlideShow, works as usual. Even the 'Reboot to UEFI bios' button, which is why the whole problem came up with me in the first place.

If you want to ask why I don't remove the 15 second delay, well, I tried that. Because then it doesn't work again. And I only have a half-functioning Rainmeter, as well as the 'ImageSize.dll' problem. :(
In short, I find this solution a little suboptimal. But until I have a better solution, or someone finds a better solution for me, I'm not sure.
- 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 »

Look - I have no need for a slideshow, so I am a no-go for testing such skins, however, I am willing to give you alternatives:
  • picinfo plugin: <Edit>Found the plugin:
    PicInfo.rar
    It was made in 2013 and maybe updated in 2014.
PS: This was the forum for "How to execute the "Reboot to UEFI Bios" command with Rainmeter", you already gave a link for the forum related to your problem with imagesize plugin - maybe - utilise that?
You do not have the required permissions to view the files attached to this post.
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 8th, 2023, 10:04 am I can't do without the plug-in itself (at least not yet). And I don't really want to.
I know you found out that the plugin wasn't the culprit but rather the Task Scheduler settings (if I understood that correctly), but just for the record, IF it were to be the plugin, then nobody would have been able to help if you didn't want to be helped in the first place (e.g. sticking with a inefficient method despite the many efficient alternatives)... :confused:
Youkai1977 wrote: November 8th, 2023, 10:04 am But, I think I have found a solution.
Excellent then, problem solved - well done! :thumbup:
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 »

@ZXCVBOT:
Thanks for your tips on the slide/slideshow. I'll have to have a look at it when I get the chance to see if I can do something with it, or use it for my current slideshow.

As for the reference to my post in the other topic, that's right, I actually wanted to get help there. But somehow it went on in this topic :oops: :Whistle


@Yincognito:
Yes, that's what I thought too, that if it was only the ImageSize.dll that was on strike here, then help would be rare.
I would probably have decided to do without my 'Reboot to UEFI' button instead of my slideshow
Excellent then, problem solved - well done! :thumbup:
Well, it looks like it's not going to work out after all. It's totally strange somehow. If I use setting XY it works, then again it doesn't. Then I change the setting, as described in detail in my last post, for example. Then it works 1-2 times, then the same game.
So either I'm too blonde to work correctly with the task planning, or Rainmeter doesn't like something.
For me as a layman of the matter I see no difference whether I start a program via the task scheduler with admin rights. Or via the autostart (folder) with admin rights.
It's the same for me, but apparently not for Windows or Rainmeter :???: :confused:

I think I'll undo everything with this task scheduler and try the old traditional way. And that is to convince Rainmeter to start via the autostart (folder) with admin rights.
So far that doesn't really work either, which is why I started with the task scheduler, but well. A solution has to be found one way or another.
- 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 »

If something Rainmeter-related is not working for you, try and reinstall Rainmeter.. Maybe it would solve your issue. If it doesn't try some alpha build.. If that too doesn't work, then it's a plugin-problem.

I can't understand what you mean by this: "When I restart or boot my PC now, Rainmeter starts as usual, as if it were in the autostart folder."
Can you clarify - what do you want/ how do you want it to happen? Basically: https://forum.rainmeter.net/viewtopic.php?t=43133&start=10#p219342
What are you trying to accomplish? Also what program are you using?

Also, don't rely on 3rd party programs whenever you can do the job normally. As for autostarting Rainmeter as admin whenever you start your PC, I did post this already: https://forum.rainmeter.net/viewtopic.php?t=43133#p219197

Also, it would be a lot helpful, if you provided some sample/example of what you are doing for testing purposes. I'll try to do that.. (I take back no-go policy this time)
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 8th, 2023, 5:20 pm@Yincognito:
Yes, that's what I thought too, that if it was only the ImageSize.dll that was on strike here, then help would be rare.
[...]
A solution has to be found one way or another.
Well, as far as I can see, ZXCVBOT already provided some regarding shutting down, I also mentioned some regarding avoiding the plugin. Anyways...
Here are two ways of running a process as an administrator, in this case for killing a process (this is copy pasted from my suite):

Code: Select all

; PwrShell: Start-Process powershell -windowstyle Hidden -verb RunAs \"Stop-Process -Name '#ProcessToKill#' -Force; Exit\"
; TaskKill: Start-Process taskkill -windowstyle Hidden -verb RunAs '/F /FI \"IMAGENAME eq #ProcessToKill#.*\"'

[MS_RunCommand_KillProcess]
Measure=Plugin
Plugin=RunCommand
Program=powershell
Parameter=Start-Process taskkill -windowstyle Hidden -verb RunAs '/F /FI \"IMAGENAME eq #ProcessToKill#.*\"'
State=Hide
OutputType=ANSI
Timeout=5000
DynamicVariables=1
The first comment starts PowerShell with admin privileges from PowerShell itself in order to "RunAs" some command, while the second starts the desired process with admin privileges instead. Quotes are escaped by preceding them with \ in order to suit the command line requirements. Obviously, some other process or command (i.e. other than killing a process) can be executed like this, probably your shutdown routine as well.
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 »

@ZXCVBOT:

First of all, sorry for getting back to you so late. But I've been a bit under the weather the last few days and therefore not on the PC.

So to your questions, as far as I understand them correctly through the translator, or my answers to your questions are understandable for you through the translator.

1)
If something Rainmeter-related is not working for you, try and reinstall Rainmeter... Maybe it would solve your issue. If it doesn't try some alpha build... If that too doesn't work, then it's a plugin-problem.
Well, I have now reinstalled Rainmeter. Before that I cleaned my system as good as possible from all Rainmeter program remnants. Like registry entries, file remnants and so on. Then reinstalled Rainmeter, and it works again as usual, BUT with the fact that my "Reboot to UEFI" button is NOT FUNCTIONAL, because Rainmeter is NOT started with ADMIN RIGHTS with Windows. So the problem that started all the other problems. See -> https://forum.rainmeter.net/viewtopic.php?t=43133#p219249 <-

2)
I can't understand what you mean by this: "When I restart or boot my PC now, Rainmeter starts as usual, as if it were in the autostart folder." ...
Well, in the end it is/should be quite easy to understand what I have tried and tested. Starting with exactly your tip from -> https://forum.rainmeter.net/viewtopic.php?t=43133#p219197 <- which meant that Rainmeter would NOT start with Windows on my system, but I had to start it manually.
This, in turn, led me to try the "Task Scheduler" method, which, strangely enough, didn't work very well. Among other things because I thought that the "ImageSize.dll" plug-in for my SlideShow would then cause me problems. But this turned out to be a mistake, as Rainmeter somehow, how shall I put it? ... "Like frozen". In other words, Rainmeter started superficially as usual and desired, certain skins/meters also worked, such as the CPU meter, which gets its data from HWInfo. But other skins/meters were like stiff/dead/frozen.
So I tried various startup methods in the "Task Scheduler" for Rainmeter. And from then on it got really weird. Sometimes Rainmeter worked as desired after the start, including my "Reboot to UEFI" button, then the next time I restarted my PC, with an UNCHANGED start configuration in the "Task Scheduler", it didn't work again. See "Frozen Rainmeter"
Zu der Frage welche Programme ich genau nutze:
- Windows 11 Pro x64 (23H2 - 22631.2506)
- Rainmeter 4.5.18

3)
Also, don't rely on 3rd party programs whenever you can do the job normally. As for autostarting Rainmeter as admin whenever you start your PC, I did post this already: https://forum.rainmeter.net/viewtopic.php?t=43133#p219197
Also, it would be a lot helpful, if you provided some sample/example of what you are doing for testing purposes. I'll try to do that. (I take back no-go policy this time)
Now, about the thing with the third-party programs to start Rainmeter with admin rights. I think there is something misleading. I don't use third-party programs for this. But the "Task Scheduler" integrated in Windows11. Or your idea/suggestion from -> https://forum.rainmeter.net/viewtopic.php?t=43133#p219197 <-
But exactly that does NOT work with my system, or only partially. Neither the one solution nor the other.

If I understand your last question/request correctly (through the translator), should I explain my previous approach to you? Or provide you with my skins/meter for error analysis? I find your request a little confusing (possibly due to the translator).
Because if you need the former from me, well, I've already explained that, or it's easy to understand what I've tried/tested in my previous posts.
But if you mean the latter, well I can do that, then I pack my complete theme with all meters/skins into a *.rmskin and load in the Forum up.



@Yincognito:

As I said, the problem is not the ImageSize.dll.
Rainmeter as a whole fails or is not even started when I use the tip from "ZXCVBOT" or the "Task Scheduler".

Therefore, I have uninstalled and reinstalled Rainmeter, as ZXCVBOT already wrote. With the autostart function specified in the RM setup routine.
Now it runs again, but the "Restart to UEFI" button, from "ZXCVBOT"`s suggestion -> https://forum.rainmeter.net/viewtopic.php?t=43133#p219187 <- just not.

In short, with everything that has already been tried here from my side, or what you have presented me with ideas and suggestions. Much of it can already be found here in the forum or via Google.
It just won't work. I'm slowly running out of places to start.

My Windows has just been freshly installed, and Rainmeter is now too. I don't know, I almost suspect that it might be Windows 11 itself. Something is not working.

Regarding your "[MS_RunCommand_KillProcess]" suggestion. I have to admit that I don't understand what you are trying to tell me. :confused: :???: :oops:
What should I do with it, where should it go? Why do I have to kill a process?
Sorry, don't be angry. I don't want to make fun of you or anything. I'm glad that you're taking care of my crude Rainmeter problem.
But I think it's just because I'm not quite fit again, and I also have a lot on my plate at the moment.
- 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 13th, 2023, 10:12 am Regarding your "[MS_RunCommand_KillProcess]" suggestion. I have to admit that I don't understand what you are trying to tell me. :confused: :???: :oops:
What should I do with it, where should it go? Why do I have to kill a process?
I'm trying to tell you to try it yourself, because it will work, I tested it myself. You don't have to kill a process, you obviously just have to replace that part with your shutdown command / parameters / routine. It doesn't need Rainmeter to be started as an administrator, because the process itself (shutdown.exe, in your case) will be started as an administrator by PowerShell, once you properly replace the taskkill command and parameters with your own (which is your job). ;-)

You can simply create a basic skin with just that (adjusted to your case) measure and a meter running it on left click to see what I mean. Then you can apply the approach to your actual skin. It's not like it's rocket science, you know... :confused:
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


Ah ok. So now I understand that to mean the part from 'ZXCVBOT':

Code: Select all

[mRebootToUEFI]
Measure=PLUGIN
Plugin=RunCommand
Program=PowerShell
Parameter=(shutdown /r /fw /t 0)
through your part:

Code: Select all

[MS_RunCommand_KillProcess]
Measure=Plugin
Plugin=RunCommand
Program=powershell
Parameter=Start-Process taskkill -windowstyle Hidden -verb RunAs '/F /FI \"IMAGENAME eq #ProcessToKill#.*\"'
State=Hide
OutputType=ANSI
Timeout=5000
DynamicVariables=1
should replace this, right?

However, I don't know what to do with the part

Code: Select all

#ProcessToKill#
now. This is a variable that refers to something, or am I making a mistake here? If so, then sorry :???: :oops:
- 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: