It is currently April 19th, 2024, 4:22 pm

Boot Rainmeter with Administrative Privileges for Vista & 7

Tips and Tricks from the Rainmeter Community
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by jsmorley »

Great, well written tutorial.

A few thoughts:

Assuming you leave UAC on, (which I don't, but that's a personal preference we don't need to argue about) the way Microsoft treats the "Program Files" directory isn't "big brother". It makes perfect sense. You install applications to Program Files, saying "yes" to all the UAC prompts, and Windows then protects that installation from having 3rd party executables do things to the installation like add a virus to your .exe files. Once an application is installed in Program Files Windows expects the only changes to take place in that folder happen with a human sitting in front of the computer saying "yes" to UAC prompts. Windows now treats "Program Files" much as it does "Windows\System32". Ok to add things like .dll files at install time, (where a human accepts the changes through UAC prompts) but programs can't write there after the installation.

All "changeable" data for an application is supposed to be kept in "C:\username\AppData" (either "\Local\applicationname" or "\Roaming\applicationname"). That is where a well-behaved Windows application should keep things that change like .ini files. Not in "C:\Program Files". This is true in XP just as much as it is in Vista or Windows 7. (although in XP the folder name convention is "C:\Documents and Settings\username\Local Settings\Application Data\appname") While this has been the standard for how a well behaved Windows program should operate for over 8 years, Windows has only started enforcing it a bit more in Vista and Windows 7 with UAC, and it is a good thing that will protect a lot of people from rouge software.

I guess my point is that after 8 or more years it might be time for Rainmeter to start following the rules. Whether someone has UAC on or not, runs XP or Windows 7, Rainmeter should keep all skin folders and .ini files in the proper "Application Data" folder and not try to write changes to "Program Files".

I don't mean this as a criticism of Rainmeter, it was originally written when everybody did it this way. However, look at the tutorial you just posted... Do we expect Rainmeter to ever gain wider popularity with more than a clique of "propeller-heads" if folks have to do something that complicated to get it to work? This should be a high priority fix. Windows 7 is (IMHO) going to be a much better success than Vista was, and in any case as folks buy new PCs they are going to be moving off of XP pretty soon. The only reason this hasn't already killed Rainmeter is because about 50% of the kinds of people that currently use Rainmeter turn off UAC, and the other 50% are still on XP.

I know full well this isn't a trivial change, as Rainmeter is currently designed to assume everything is in directories under ..\Rainmeter\ and changing it to use %APPDATA%\Local\Rainmeter for skins and other .ini files while leaving the executables and .dll's in Program Files would take some doing. Going to need to happen sooner or later though.
Last edited by jsmorley on May 3rd, 2009, 11:32 pm, edited 1 time in total.
sgtevmckay

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by sgtevmckay »

I must wholly agree, but there is also the fact that there are programs that have followed there own programs paths for so long that maybe MS should have considered this, before enforcing application rules.
There is also windows inability to properly uninstall from the AppData files in the Vista an 7 environments, which still forces users to find hidden files, after an uninstall.
Now agreed; a lot of software purposely leaves information in the AppData, and registry files in order to enforce certain used/user traits, and to attempt to prevent pirating techniques.

I will stand by the Task Scheduler, especially the new one. It may appear a lot, but is very intuitive once it is worked with.
It is always easy when you know.
I say to you that if the Task CSheduler looks like a lot, then no one would ever have used windows, what we see as easy today was incredibly intimidating a few years ago.

I am a supporter of the UAC, but I also believe that MS has extended it's arm a little further than they should have.
I think an option for user level access, concerning UAC behavior should have been instituted; I site the inability to install unsigned drivers in this instance

I also agree that the Rainmeter install package should be proper, but essentially could be declared proper until Windows Vista.

But which one is "More Right" is not my decision, all I can say is folks have been using programs that have worked in a windows enviro for a long time until the advent of Vista.
I also believe that 7 is going to be the way to go, and I honestly wish that MS had done away with the 32 bit distro.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by jsmorley »

I do agree that this "enforcement" could have been more graceful in letting grandfathered applications in without having to be re-written. They should have created a new folder naming scheme where you had "C:\Program Files" where older programs would install and this folder wouldn't be protected any more than it was under XP, then create a new folder called "C:\Application Files" or something where new programs, written with Vista or Seven in mind, would install and would be protected. Then there could have been a gradual movement from the old to the new as programs were upgraded by the authors without the jarring change requiring work-arounds and tweaking...

I suspect they looked at something like this and decided the confusion for users (where the heck is my application?) and problems with upgrades to apps (now setup.exe has to look for the old one in Program Files and get rid of it while it installs the new one in Application Files) made it more trouble than it was worth.
Last edited by jsmorley on May 3rd, 2009, 11:45 pm, edited 1 time in total.
sgtevmckay

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by sgtevmckay »

Nothign to be done about it now, except to get compliant!

Something should be written up for the dev folks!

Since I tend to be overly wordy;
jsmorley
Could you write something up that can be passed onto the Dev Folks.
Or you could post directly to the Issue board regarding this.

The problem I see is that the AppData file is a hidden file, and and Open skins menu item will have to be issued to the context menu to make accessing the skins folder easily viable.

Not to mention all the skinners that have been creating installer, will need to change their installers, and in the inetrim, folks may need a tutorial on how to unpackage and hand install skins.
sgtevmckay

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by sgtevmckay »

Also; I would have you know that you have broken my heart. :P

I can get into the Task scheduler, program, get out, and reboot in less than 4 minutes, but it took me hour to do that TUT, and not even so much as a thanks :D

I do not like the solution either, but it is what works. Under the UAC programs to be started at logon are supposed to have a shortcut to the Startup folder, and I would just a soon get back to that :!:
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by jsmorley »

Sure. Let me scratch my head a bit about how best to deal with the fact that %APPDATA% is a hidden folder in Vista/Seven. This was one place where I think your comment about "overreaching" by MS is true. I mean, OK - you don't want us to put "changeable" stuff in "Program Files" but rather keep it in %APPDATA%\Local. So the stuff in there I am free to mess with, right? No, only "humans" should be allowed to write to Program Files so Windows is sure folks are agreeing to the changes, (UAC) but only "programs" should be allowed to make changes in %APPDATA%, so humans are protected from themselves.

It's trvial to "unhide" the AppData folder, but let me think about a way which doesn't require the user to change the way Windows works out of the box.

I will post something to the Issues Board...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by jsmorley »

sgtevmckay wrote:Also; I would have you know that you have broken my heart. :P

I can get into the Task scheduler, program, get out, and reboot in less than 4 minutes, but it took me hour to do that TUT, and not even so much as a thanks :D

I do not like the solution either, but it is what works. Under the UAC programs to be started at logon are supposed to have a shortcut to the Startup folder, and I would just a soon get back to that :!:
Hahaha! I did say "Great, well written tutorial", and I meant it! :lol:

I have never had to do what you did in the tutorial. A simpler way I have found that works is to create a shortcut for the application .exe you want to run, set the shortcut to "Run as Administrator", and then put the shortcut in Startup. You can do this with a shortcut, but not easily for the target .exe.

Image
sgtevmckay

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by sgtevmckay »

The problem with that is, if you try to start a program with admin privies through the Startup file, the UAC, essentially windows, will stop it, and you get a really nice warning about how it stopped a program from running on boot with admin privies
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by jsmorley »

sgtevmckay wrote:The problem with that is, if you try to start a program with admin privies through the Startup file, the UAC, essentially windows, will stop it, and you get a really nice warning about how it stopped a program from running on boot with admin privies
Ah... I hadn't run into that, but I admit that the first thing I do on a new install of Windows is turn off UAC. ;-)
sgtevmckay

Re: Boot Rainmeter with Administrative Privileges for Vista & 7

Post by sgtevmckay »

Shame :lol:

What is the fun in that