It is currently March 28th, 2024, 10:02 pm

Skin Load/Unload Via Bat File

Get help with installing and using Rainmeter.
User avatar
MourningStar
Posts: 287
Joined: June 12th, 2016, 2:40 am

Skin Load/Unload Via Bat File

Post by MourningStar »

Startup of Rainmeter is included in my pc startup process. I have weather and network meter skins that do not function until the wi-fi is 'on' (connected). I have a programmable key that executes a .bat file and this file contains two commands that (1) turns the wi-fi on and then (2) executes a Rainmeter refresh-all command.

A - I now would like to modify this file to : (1) turn on the wi-fi and (2) load these wi-fi Rainmeter-dependent skins. Possible?

B - I have another programmed key that turns off the wi-fi. I would like this key to unload these wi-fi dependent skins. Possible?

C - I have another key that performs certain functions and shutsdown the pc. I would like to modify this file to include the 'unloading' of said Rainmeter skins. Possible?

Reasoning (for those that always need a 'why?') : I power on/off the pc daily (a 'why?' on this will not be provided). A small percentage of my computer activity uses the wi-fi so I do not always need nor want the internet 'connected' on my pc. One small advantage to this is it increases the available bandwidth for the household.

If alternative process exists that performs these same (Rainmeter) function easier, better, etc. I am all ears.

-Thank you
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Skin Load/Unload Via Bat File

Post by SilverAzide »

Yes to all those questions. You can invoke bangs from the command-line: "C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig configname. This would allow you to load or unload whatever skins you want, on demand.
Gadgets Wiki GitHub More Gadgets...
User avatar
MourningStar
Posts: 287
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

SilverAzide wrote: August 14th, 2021, 5:10 pm Yes to all those questions. You can invoke bangs from the command-line: "C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig configname. This would allow you to load or unload whatever skins you want, on demand.
thank you - so, would the actual command be :

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig Wireless Meter.ini ?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 5:31 pm thank you - so, would the actual command be :

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig Wireless Meter.ini ?
Not exactly. What you want with !ActivateConfig are two "quote" delimited paramters. First, the name of the "config", then the file name of the "skin". Do not enclose the bang !ActivateConfig in "quotes".

So like:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "MyConfigName" "Wireless Meter.ini"

I don't know what the config name for your skin is, but I'm guessing it's not in a config called "Wireless" and a skin called "Meter.ini". Just replace "MyConfigName" with the real one. If you right-click a running skin, the config name will be at the top of the context menu. So for instance, my system skin would look like this:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "JSMeter\System" "System.ini"


1.jpg


Alternatively, you can get the config name and skin .ini name from Manage.


2.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
MourningStar
Posts: 287
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

I placed this in the bat file :

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gedgets\Weather Meter" "Weather Meter.ini"

no joy -

I also opened a command prompt as administrator and typed it

no joy -

Is it a toggle? because I see no load/unload
Last edited by MourningStar on August 14th, 2021, 6:06 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 6:03 pm I placed this in the bat file :

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gedgets\Weather Meter" "Weather Meter.ini"

no joy -

I also opened a command prompt as administrator and typed it

no joy -
Is it really "Gedgets"?
User avatar
MourningStar
Posts: 287
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

jsmorley wrote: August 14th, 2021, 6:05 pm Is it really "Gedgets"?
no - I corrected it - still no joy
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 6:09 pm no - I corrected it - still no joy
Then you have the "config" wrong. I don't know what else to tell you other than the two ways I demonstrated with pictures above to find the config name.

Go to the actual skin .ini file in Windows explorer. Right-click it and say "Copy as path".

Paste that path here, like this:

"C:\Users\JSMorley\Documents\Rainmeter\Skins\JSMeter\System\System.ini"

So for that skin, the config is:

"C:\Users\JSMorley\Documents\Rainmeter\Skins\JSMeter\System\System.ini"

The skin .ini file is:

"C:\Users\JSMorley\Documents\Rainmeter\Skins\JSMeter\System\System.ini"

And I promise that this works:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "JSMeter\System" "System.ini"

That will load that skin if it is not running, and will do nothing if it is already running.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Skin Load/Unload Via Bat File

Post by SilverAzide »

MourningStar wrote: August 14th, 2021, 6:09 pm no - I corrected it - still no joy
You are definitely doing something wrong:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Weather Meter" "Weather Meter.ini"
"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Wireless Meter" "Wireless Meter.ini"

...works perfectly for me. Are you using a portable install of Rainmeter? If so, you need the proper path to the executable.
Gadgets Wiki GitHub More Gadgets...
User avatar
MourningStar
Posts: 287
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

jsmorley wrote: August 14th, 2021, 6:11 pm ...Go to the actual skin .ini file in Windows explorer. Right-click it and say "Copy as path".

Paste that path here, like this:
C:\Users\MourningStar\Documents\Rainmeter\Skins\Gadgets\Weather Meter

C:\Users\MourningStar\Documents\Rainmeter\Skins\Gadgets\Weather Meter\Weather Meter.ini
SilverAzide wrote: August 14th, 2021, 6:16 pm ... Are you using a portable install of Rainmeter? If so, you need the proper path to the executable.
not portable
Last edited by MourningStar on August 14th, 2021, 6:22 pm, edited 1 time in total.