It is currently September 29th, 2024, 1:20 pm

A rare Windows bug that causes rain meter problems.

General topics related to Rainmeter.
User avatar
bobgrosh
Posts: 134
Joined: May 1st, 2011, 10:33 pm

A rare Windows bug that causes rain meter problems.

Post by bobgrosh »

It turns out there might be some names for your INI files that won't work in Windows. One of them is desktop.INI. Here's what happened to me.
I have pointed the rain meter settings to a skins folder in my OneDrive, and have been editing them on 3 Different computers. Two of them are Windows 7 and one is Windows 8.1. Buried three directory levels down, I had created a desktop.INI file on one of my Windows 7 machines. A few minutes later the desired skin functioned on my other Windows 7 machine but not on the Windows 8 machine. After a fair amount of hunting I discovered that desktop INI shows up on the web version of OneDrive, and in the Windows 7 machines but not on the Windows 8. No matter how much I tried and re-synced the Windows 8 machine the desktop.INI file would not show up on the Windows 8 machine. If I manually added desktop.ini on the Windows 8 machine it would work, BUT, the next time I synced OneDrive, the file would disappear. No amount of changing the options in the file manager on Windows 8 trying to get it to show hidden or system files would make it work. While you can create a desktop INI on the Windows 8 machine, and rain meter will recognize it and work, you cannot sync that file with Microsoft's OneDrive.

What Fun
User avatar
jsmorley
Developer
Posts: 22790
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: A rare Windows bug that causes rain meter problems.

Post by jsmorley »

Desktop.ini is a standard hidden / system file created by Windows, used to store information about how you have a folder set up to view (icons, details, etc.) and such. I don't recommend creating Rainmeter skins called Desktop.ini, as that can cause conflicts.

http://www.tech-recipes.com/rx/6108/windows-7-what-is-the-desktop-ini-file-and-how-can-i-remove-it/

I did a quick Locate32 for Desktop.ini on my system:
2014-08-12_164151.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
VasTex
Posts: 407
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: A rare Windows bug that causes rain meter problems.

Post by VasTex »

If I remember right, and I probably don't, the Desktop.ini file is used by Windows to declare certain folder customization options in certain directories. It's possible that Windows is locking that file with some sort of Read/Write protection would could very possibly stop Rainmeter from being able to access it. It may also simply try and hide it thinking that it's an actual system file and Rainmeter may not be able to detect it.

In any case, naming a file Desktop.ini is a good way to give yourself a headache even if the file isn't related to Rainmeter. Best to stick to something along the lines of Desktop1.ini or MyDesktop.ini or just Background.ini -Really anything that isn't explicitly 'Desktop.ini'.

Edit:
It seems that Rainmeter can detect and use Hidden files just fine. I'm guessing it's a Read/Write issue or something along those lines.
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011
User avatar
bobgrosh
Posts: 134
Joined: May 1st, 2011, 10:33 pm

Re: A rare Windows bug that causes rain meter problems.

Post by bobgrosh »

Exactly!
After searching a few of my other machines here, I have a feeling it's not a good idea to use these words either:
lock.INI
.lock.INI
backup.ini
picasa.INI
settings.ini
PMB.INI
history.ini

PicasA and PMB (picture motion browser) appear to create two of those files in any directory where there is a picture containing a face.
Lock seems to be associated with either backup or update of some programs and I have found it in the skins folder even though it's not a skin.

I have also noticed some very strangely named files ending in .ini. The files may match the name of a JPEG file in the same directory. One of the corresponding pictures contained a sign in the store window that said "on sale now", the INI file also contain those words. I have no idea what program or possibly online service added that. I know that a new feature of OneDrive makes text contained in photos searchable, but I assume that was handled in some search index or added to the file as metadata.


I guess the probability of screwing up the skin by having some other unknown program or service create an INI is rather low. This is the first time I've experienced anything like this happening.
Anyway, I thought I'd mention it as a heads up to others after I wasted a couple hours on the desktop.INI incident. In that situation, the problem wasn't that Windows was overrating the file with its own INI, it was that the Windows 8.1 version of OneDrive refuses to sync the desktop.INI file to the Windows 8.1 machine.
In addition to not using desktop.ini, I've decided that if I have a picture named "example.PNG", it is probably a bad idea to have a skin named "example.ini".
User avatar
jsmorley
Developer
Posts: 22790
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: A rare Windows bug that causes rain meter problems.

Post by jsmorley »

The only thing I have ever run into that is a real problem is Desktop.ini, as that is an actual "system file" in Windows, and is hidden, even if "show hidden files" is turned on in your folders. That, combined with the fact that Windows will create the file in any folder where you modify the folder options, makes it a prime candidate for trouble.

Other things may create .ini files, that used to be (but isn't so much anymore) a common way to store "settings" associated with a program. However generally programs won't litter those all over the place, but only in the folder with the program or files the program saves. In any case, it is rare that any other .ini file would be "hidden", and certainly not "system".
User avatar
jsmorley
Developer
Posts: 22790
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: A rare Windows bug that causes rain meter problems.

Post by jsmorley »

If you create a skin called Desktop.ini, you run the risk of this:

I created a skin ..Skins\Desktop\Desktop.ini

In the .ini file I put:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
SkinName=Desktop

[MeterOne]
Meter=Image
W=50
H=50
SolidColor=255,255,255,255
Loaded the skin, it ran fine and worked fine with Rainmeter.

Then I went into Windows Properties / Customize for the Desktop folder, and changed the icon for the folder. As soon as I did that, Windows did the following:

1) Made the file attributes of the Desktop.ini file "hidden" and "system".
2) Changed the contents of Desktop.ini to:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
SkinName=Desktop

[MeterOne]
Meter=Image
W=50
H=50
SolidColor=255,255,255,255


[.ShellClassInfo]
IconResource=C:\Windows\system32\SHELL32.dll,12
[ViewState]
Mode=
Vid=
FolderType=Documents
It doesn't overwrite the file, but just appends to it, and then "protects" it.

Rainmeter still sees the file, as it ignores file attributes. You can still load the skin from Manage, and can edit it with Manage or by right-clicking. You can't see it in File Explorer however, and you can never create a .rmskin that includes it, as the Rainmeter package creation functionality ignores all hidden folders and files when it creates .rmskin packages.

Anyway, as you can see, a skin called Desktop.ini is just not a good idea.
User avatar
bobgrosh
Posts: 134
Joined: May 1st, 2011, 10:33 pm

Re: A rare Windows bug that causes rain meter problems.

Post by bobgrosh »

Here's a little more information I found out after messing around with this issue a bit more.
I normally uncheck the option to hide system and hidden files. Because of that I would normally be seeing a desktop.INI in practically every folder. I just remembered that a year or two ago I patched the registry to prevent Windows from creating the desktop.INI files in every directory. So… I did a search of my main Windows 7 machine and found my notes from a year ago. There was even a link to a page for details but that webpages no longer exists. According to my notes, Windows 7 and above only puts the desktop.INI files in each folder to maintain backward compatibility with non Microsoft utilities, and for folders that are shared on the network with Vista or prior OSs.
I could be wrong about this, but one note says that Windows 7 stores the needed information about folder customization in a central location and does not use the desktop.INI files for things like putting a specific icon on a folder.
I usually stay away from registry hacks. And, I don't recommend them. However, but if you're curious, this was in my notes, but, I am not sure if this is for 32-bit or 64-bit Windows 7. It is not for Windows 8 or XP.

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
“UseDesktopIniCache”=dword:00000000
I did apply it to all of my Windows 7 machines at the time.

I guess that explains why I'm able to get away with using desktop.INI as the name of the skin on the Windows 7 machines. To confirm that I fired up my Sony laptop. One of its drives, (yes, the Sony has two internal hard drives) recently started showing signs of going bad so I replaced it with a solid-state drive and installed a fresh copy of Windows 7 ultimate. As a result, the Sony does not have the registry hack. As has already been mentioned, naming a skin "desktop.ini", does not work on the Sony. Further, I noticed that customizing the containing folder with an icon does replicate on to the other two Windows 7 machines. It does not replicate onto the Windows 8 machine. In fact if you manually create a desktop INI on the Windows 8 machine,Onedrive will delete it from the Windows 8 machine when you sync it with a Windows 7 machine.

Okay so I know I probably provided way too much information, but, lesson learned. Never name your skin desktop.INI.