It is currently April 20th, 2024, 3:43 am

Icon to turn computer off.

General topics related to Rainmeter.
Hoosier
Posts: 21
Joined: November 10th, 2020, 5:21 pm

Icon to turn computer off.

Post by Hoosier »

I have an icon on my desktop linked to a script that will turn off the computer.
But it's not part of Rocket Dock.
Is there some way I can link a Rocket Dock icon to this script, or anything really, that will turn off the computer?
Thanks..this forum is always so helpful.
KJ
User avatar
tass_co
Posts: 515
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Icon to turn computer off.

Post by tass_co »

Hoosier wrote: August 19th, 2022, 11:39 pm I have an icon on my desktop linked to a script that will turn off the computer.
But it's not part of Rocket Dock.
Is there some way I can link a Rocket Dock icon to this script, or anything really, that will turn off the computer?
Thanks..this forum is always so helpful.
KJ
I can recommend an application that can exe the bat file extension.
Bat To Exe Converter
or
If you send me the icon you want, I can create an executable file for you :thumbup:
or
I don't know about Rocketdock. If you can change the icon through the application, I can share normal files
code content "shutdown.exe" -s -t 00
Shutdown.rar
You do not have the required permissions to view the files attached to this post.
I don't know where i going from here, but i promise it won't be boring... :great:
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Icon to turn computer off.

Post by Active Colors »

If your script is in some powersell or commandline file then you can use some mouse action to run it, for example LeftMouseUpAction=["C:\your script.bat"]

You can alao use RunCommand plugin to run such scripts.
https://docs.rainmeter.net/manual/plugins/runcommand/
https://forum.rainmeter.net/viewtopic.php?t=16715
Hoosier
Posts: 21
Joined: November 10th, 2020, 5:21 pm

Re: Icon to turn computer off.

Post by Hoosier »

Thank you for the replys, both of which I've tried with no luck.
I think my ignorance of the correct termonolgy for what I'm using may have mislead you.
This is the line that I am using with the decktop icon....

%windir%\System32\shutdown.exe /s /t 0

This is inserted into the "target" box located in the icons properties.

When I insert this line into the "target" box for a RocketDock icon and then activate the icon I get the following error message.

"Windows connot find :C/WINDOWS\System32\shutdown.exe/s/t 0."
User avatar
tass_co
Posts: 515
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Icon to turn computer off.

Post by tass_co »

Hoosier wrote: August 20th, 2022, 4:44 pm Thank you for the replys, both of which I've tried with no luck.
I think my ignorance of the correct termonolgy for what I'm using may have mislead you.
This is the line that I am using with the decktop icon....

%windir%\System32\shutdown.exe /s /t 0

This is inserted into the "target" box located in the icons properties.

When I insert this line into the "target" box for a RocketDock icon and then activate the icon I get the following error message.

"Windows connot find :C/WINDOWS\System32\shutdown.exe/s/t 0."
I downloaded and tried the app for you.
You don't need any scripts.
Just follow the steps below.


Right Click => Add Item => Blank Icon => Right Click (Created Icon) => Icon Settings...
Target=C:\Windowns\System32\shutdown.exe
Arguments=-s -t 00

20.08.2022 - 20.06.03-.png
You do not have the required permissions to view the files attached to this post.
I don't know where i going from here, but i promise it won't be boring... :great:
Hoosier
Posts: 21
Joined: November 10th, 2020, 5:21 pm

Re: Icon to turn computer off.

Post by Hoosier »

It works now....
Thank you very much for the help.
Every visit here is a learning experience.
User avatar
tass_co
Posts: 515
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Icon to turn computer off.

Post by tass_co »

Hoosier wrote: August 21st, 2022, 1:20 am It works now....
Thank you very much for the help.
Every visit here is a learning experience.
:great:
I don't know where i going from here, but i promise it won't be boring... :great:
User avatar
alexis92
Posts: 32
Joined: March 24th, 2022, 9:56 pm

Re: Icon to turn computer off.

Post by alexis92 »

This is actually very useful, I'll be yoinking this. Might try it out myself! :Whistle