It is currently March 28th, 2024, 10:40 am

Automate Install and Skin Configuration

Get help with installing and using Rainmeter.
roysubs
Posts: 7
Joined: April 3rd, 2020, 7:07 pm

Automate Install and Skin Configuration

Post by roysubs »

I like to automate my system with PowerShell. I've been googling around and not found an answer to what I hope is a fairly simple question for the Rainmeter experts here:

• Step 1: Automated install of Rainmeter is simple, this was easy to achieve: cinst -y rainmeter # Once Chocolatey has been installed of course.

• Step 2: This is the part that I cannot do: Once installed, run a command that will download a skin (I prefer low-key elegant skins over heavy/flashy ones, but I don't mind which skins to install, anything you guys think is great! :) ) and apply that skin onto the system.

The key is that I could then have a batch or PowerShell script that will install and configure Rainmeter.
Rainmeter is a very mature application so I'm hoping that this should be straightforward for the gurus here? :)
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Automate Install and Skin Configuration

Post by Yincognito »

roysubs wrote: April 3rd, 2020, 8:11 pm I like to automate my system with PowerShell. I've been googling around and not found an answer to what I hope is a fairly simple question for the Rainmeter experts here:

• Step 1: Automated install of Rainmeter is simple, this was easy to achieve: cinst -y rainmeter # Once Chocolatey has been installed of course.

• Step 2: This is the part that I cannot do: Once installed, run a command that will download a skin (I prefer low-key elegant skins over heavy/flashy ones, but I don't mind which skins to install, anything you guys think is great! :) ) and apply that skin onto the system.

The key is that I could then have a batch or PowerShell script that will install and configure Rainmeter.
Rainmeter is a very mature application so I'm hoping that this should be straightforward for the gurus here? :)
That's an interesting question, and apparently nobody bothered trying to answer it yet - probably because it's not strictly a Rainmeter related topic. I'll try to at least point you in the right direction:

Step 2:
  • downloading the file
    See here, here and here on how to download a file using PowerShell. Generally, as far as I can tell, using System.Net.WebClient seems to be the way to go, but the thing you will most likely have "issues" with will be logging in on a site like DeviantArt in order to be able to download the .rmskin file, and for that you'll probably have to switch to using Invoke-WebRequest while supplying your login credentials. DeviantArt used to allow downloading without logging in or registering, but, like many companies and sites nowadays, got really stupid and ignored what users wanted, so that's that. Another option would be to download the .rmskin file from its page here on this forum (not all the skins have one though), where no login is required as far as I recall.
  • apply the skin onto the system
    This can be done easily outside PowerShell by using the fully qualified path+filename of the .rmskin file as the command. Within PowerShell, maybe this will help. I don't know if Rainmeter has any "silent" parameters so that one can "install" a skin from a .rmskin file without having to click Next in one or two installation prompts, but maybe you can using the already mentioned Chocolatey method, like cinst -y SkinFileNameAndExtension.
Apart from the hypothetical login issue that you might encounter on DeviantArt while trying to download the file, another potential "issue" to solve could be detecting when the .rmskin file download ended, so that you can start installing the skin. I'm not sure how this can be tackled in PowerShell, maybe using the error codes of the download process (if any) can help with this.

That being said, the process can be greatly simplified if the skin is already present on one of the local drives (Google Drive / One Drive ?). I don't see a reason why this wouldn't be the case, as even in the case of an automated Windows 10 installation using a software like NTLite, you'd still have the D:, E: and such drives available and untouched by the OS installation process. Even if not, using a flash drive isn't an issue either.
roysubs
Posts: 7
Joined: April 3rd, 2020, 7:07 pm

Re: Automate Install and Skin Configuration

Post by roysubs »

Yincognito wrote: April 18th, 2020, 6:53 am That's an interesting question, and apparently nobody bothered trying to answer it yet - probably because it's not strictly a Rainmeter related topic.
That's true, though it is about how to most-easily configure a new system to someone's Rainmeter preferences with the minimum of fuss, which is possibly appealing to a number of people that use Rainmeter. For myself, I rebuild my system every few months, and from a clean build to a fully configured system with maybe all of my tools takes no more than 30 minutes for dozens of tools and hundreds of registry tweaks and configurations, none of which I am doing, all automated, downloading the latest versions of all of the tools that I want on that system and configuring them. I'm loathe to add tools that cannot be installed and configured silently and cleanly, but to my surprise (possibly amazement), I found that a seemingly mature tool like Rainmeter doesn't offer the ability to do this. One thing that is good is that there is a Portable install option, which opens Rainmeter up to being integrated into a setup.

Thanks for your answer, it's really appreciated. I do know how to download files with PowerShell but this is a great overview of how the skins might be applied. I'm going to go and try some things, and I will post a full answer on here once I've worked through some options (or more questions if I hit a problem). As you mention, the big stumbling block seems to be that it's not possible to get onto the site without logging on, I might use AutoHotkey to automate that, or possibly I can inject the username/password into the URL, have to play around with what can be done.

The goal should be routine for any modern app: the ability to automate the setup (in this case, the portable option is the only path as the Rainmeter developers have decided to disable silent installs for some reason that has never been explained), get a specific skin to install, apply that and any configuration that a user might require. Hopefully, I can get further with this (though might take me a few weeks with other projects going on - if anyone has anything that might help further, or possibly who has already built a solution that does this, that would be great to know).
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Automate Install and Skin Configuration

Post by Yincognito »

Yes, indeed, automation is the target in many situations. I went down that road years ago as well, trying to make it all work, but in some situations automation just isn't the most productive / efficient approach, so I eventually gave up. Updating all the apps automatically is also a no-no for me, as I prefer installing versions that I know they work, and as you probably know, some updates in various software can introduce new bugs, break things that were working in previous versions, and all that stuff. I do, however, save registry exports, configuration files or create my own "readme"-s to greatly simplify the adjustments needed after the installation of programs, so it's a sort of "semi-automatic" process in my case.

Regarding Rainmeter, yes, they used to have the option of silent installation available, but they removed it in version 4.0. The reason might have been that it produced more problems than it solved, especially for "regular" users with less experience in these kind of things. For example, some skins come up with specific layouts that replace the existing ones, and that can be undesirable for the normal user who attempts to do an automated install.

Anyway, every problem has a solution, and I'm sure this one has as well. I look forward to see yours, so don't hesitate to post it here when it's done. ;-)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Automate Install and Skin Configuration

Post by jsmorley »

Over time, the silent install functionality become more and more "broken", as the security and permissions in Windows evolved. We just decided it was more trouble than it was worth to try and keep it working correctly in all cases, with all users.

While I know it isn't what it being suggested here, we are also just skeptical in principle to a common use of "silent installs", to propagate software to an entire organization. It's not a good fit for Rainmeter. Rainmeter is "opt-in" in every sense.

We fully understand the charm of fine-tuning and automating how you install and use Windows and applications on your machine.

Having said that, we really just don't care about silent installs of Rainmeter. It's something that one user out of a millions wants, and nobody actually needs.
roysubs
Posts: 7
Joined: April 3rd, 2020, 7:07 pm

Re: Automate Install and Skin Configuration

Post by roysubs »

jsmorley wrote: April 24th, 2020, 12:50 pm Over time, the silent install functionality become more and more "broken", as the security and permissions in Windows evolved. We just decided it was more trouble than it was worth to try and keep it working correctly in all cases, with all users.

While I know it isn't what it being suggested here, we are also just skeptical in principle to a common use of "silent installs", to propagate software to an entire organization. It's not a good fit for Rainmeter. Rainmeter is "opt-in" in every sense.

We fully understand the charm of fine-tuning and automating how you install and use Windows and applications on your machine.

Having said that, we really just don't care about silent installs of Rainmeter. It's something that one user out of a millions wants, and nobody actually needs.
Thanks for this, and that makes sense, I also completely understand your reasons for removing the silent install options if security and permissions were becoming awkward.

However, I think you've misinterpreted my intent somewhat. I want Rainmeter to be opt-in only, I would never think about propagating it to an entire organisation, and I agree that would not be a good fit for Rainmeter. The point is: like me, I know many people that have many apps that they install on new systems. Before being able to automate installations (e.g. in the old days having to use something as clunky as DOS batch files) it could take days or weeks of manual installs to configure a new system. Now, today, I have about 100+ distinct configurations and installations that I can automate with ease (modular scripts to remove tedious manual install after tedious manual install, I can just line up the script for each component and then all 100 items will install silently in the background, and I know loads of people also do this). So, I think saying that all automation has a single goal, and that single goal is to propagate software to an entire organization is ignoring the many many people that have no interest in propagating to entire organisations and who ONLY want to have Rainmetere "opt-in", in every sense but without the tedious and boring act of manual installation.

All I really want is a ZIP file that has the portable Rainmeter (latest version) inside. I understand your reasons for not having silent installs now and those are good reasons, but would it be possible to download Rainmeter as a portable package from you? i.e. if a ZIP file was available for download that is just the portable install in a single folder, my script can: • download the latest ZIP file, • silently unpack to a folder of my choice, • setup a shortcut for it and add it to the startup folder, • apply any registry changes or other configurations that I require, and done! The portable install facility is there, and that's *great*(!). If we can get a ZIP file of a portable setup in that state everything would be easy. Is that somewhere on your website (I looked at portable companies and none available, but you already have portable functionality so all it requires is that the ZIP file of the portable version be available).
Last edited by roysubs on April 27th, 2020, 1:48 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: Automate Install and Skin Configuration

Post by jsmorley »

roysubs wrote: April 27th, 2020, 9:24 am Thanks for this, and that makes sense, I also completely understand your reasons for removing the silent install options if security and permissions were becoming awkward.

However, I think you've misinterpreted my intent somewhat. I want Rainmeter to be opt-in only, I would never think about propagating it to an entire organisation, and I agree that would not be a good fit for Rainmeter. The point is: like me, I know many people that have many apps that they install on new systems. Before being able to automate installations (without going insane e.g. in the old days having to use something as horrible as DOS batch files) it could take days or weeks of manual installs to configure a new system. Now, today, I have about 100+ distinct configurations and installations that I can automate with ease (modular scripts to remove tedious manual install after tedious manual install, I can just line up the script for each component and then all 100 items will install silently in the background). So, I think saying that all automation has a single goal, and that single goal is "to propagate software to an entire organization" is kind of completely ignoring the many many people that have no interest in propagating to entire organisations and who ONLY want to have Rainmetere "opt-in", in every sense but without the tedious and boring act of manual installation.

I have a question though: I understand your reasons for not having silent installs now and that's sensible, but is it possible to download Rainmeter as a portable package from you? i.e. it would be great if a ZIP file was available for download that is just the portable install in a single folder(!). With that, my script can just download the latest ZIP file and then silently unpack it to a folder of my choice and setup a shortcut for it and add it to the startup folder, apply registry changes or other configurations and that's done (easy!). As you have a portable install facility, if I could download the ZIP file of the portable setup of the latest version in that state, that would be great. Is that somewhere on your website (I looked at portable companies and none available, but you already supply portable functionality, so all it requires is the ZIP file of the portable version being available).

We don't make a .zip version of the application available. The problem with that is that there is some evaluation of the hardware and Windows version on your system that we do during the install process, primarily to determine if the 32bit or 16bit version should be installed. So we would need to host both versions of all the executable files. I don't think we are likely to do this in any case, as there is some added security in the digitally-signed .exe of the setup program, and while you can certainly download, install a local copy as portable, then zip it up for your own use, we are not thrilled with getting into that business.
roysubs
Posts: 7
Joined: April 3rd, 2020, 7:07 pm

Re: Automate Install and Skin Configuration

Post by roysubs »

The security is a non-issue because I'd put the file in my user folder so that solves itself (and I can elevate if need to). If the portable versions are zipped that would be really great and we can download the latest version with ease (I do this for lots of other software, from 7-zip to ftp clients etc etc) then I just extract the files and that will work with absolute certainty (as all security is sorted automatically). i.e. if they are just hosted on the home page as Portable 32-bit and Portable 64-bit as zip files then they are guaranteed to work on 100% of systems in all cases.

With the installer-only version available, I can automate the download of the installer (that's great!) but then I have to *manually* install it in portable mode. :( That's a real shame as you have all of the tools to make it available automatically in your build process. With the portable32-bit and portable-64bit available on the site then it's just a cause of:
• detect architecture of system and grab appropriate .zip file (32-bit or 64-bit)
• unzip to a folder that I want to host Rainmeter in and create shortcuts (including in startup folder)
• modify .ini / registry to set any configuration that I require including maybe setting the default skin.

Would really appreciate this as it would be so clean and elegant to get Rainmetter onto anyone's system (in a clean and painless "opt-in" way, including folks that are not too technical) would then become really easy. I'd also be really glad to post my solution to the above to help anyone as it'll be really easy to do this with the portable available. :) Making it as easy as possible for users to install Rainmeter with absolutely minimum fuss and hassle, and absolutely no work from the Rainmeter team (i.e. just a link to the latest portable .zip). I would not ask you to do any work and I completely understand/agree with your reasons for removing the silent install option.
Last edited by roysubs on April 27th, 2020, 2:38 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: Automate Install and Skin Configuration

Post by jsmorley »

roysubs wrote: April 27th, 2020, 2:30 pm The security is a non-issue because I'd put the file in my user folder so that solves itself (and I can elevate if need to). If the portable versions are zipped that would be really great and we can download the latest version with ease (I do this for lots of other software, from 7-zip to ftp clients etc etc) then I just extract the files and that will work with absolute certainty (as all security is sorted automatically). i.e. if they are just hosted on the home page as Portable 32-bit and Portable 64-bit as zip files then they are guaranteed to work on 100% of systems in all cases.

With the installer-only version available, I can automate the download of the installer (that's great!) but then I have to *manually* install it in portable mode. :( That's a real shame as you have all of the tools to make it available automatically in your build process. With the portable32-bit and portable-64bit available on the site then it's just a cause of:
• detect architecture of system and grab appropriate .zip file (32-bit or 64-bit)
• unzip to a folder that I want to host Rainmeter in and create shortcuts (including in startup folder)
• modify .ini / registry to set any configuration that I require including maybe setting the default skin.

Would really appreciate this as it would be so clean and elegant to get Rainmetter onto anyone's system (in a clean and painless "opt-in" way, including folks that are not too technical) would then become really easy. I'd also be really glad to post my solution to the above to help anyone as it'll be really easy to do this with the portable available. :)
I understand the charm, but sorry, it's not going to happen.
roysubs
Posts: 7
Joined: April 3rd, 2020, 7:07 pm

Re: Automate Install and Skin Configuration

Post by roysubs »

ok, bit confused as this seems to fit in 100% with everything that you said above, with only upsides for Rainmeter. I get that it's your project man, so you are the dictator in charge and that is your privilege which is absolutely your right :) This bit, having "portable" as an install option but without the ability to just grab the latest portable version, is sorta frustrating as it's so easy to do. Hopefully something you can consider for the future since it's zero effort and is 100% in line with the ethos that you expressed above.

I'll shelve my project then. I guess I ain't going to be able to achieve a one-click to "grab Rainmeter portable, configure it, add a skin, and enjoy" even though portable option is already there but frustratingly denied.
Post Reply