9
2
In Windows 7 x64 SP1, when creating a desktop.ini file with a text editor (e.g. notepad, notepad++) and saving it inside a folder, it does not work. For example, I have saved this desktop.ini inside a folder:
[.ShellClassInfo]
IconResource=C:\Windows\explorer.exe,0
[ViewState]
Mode=
Vid=
FolderType=Generic
But it does not work, i.e. the folder icon does not change! I have tried ANSI or Unicode encoding, neither does work.
Of course, when I change the folder icon with the Properties dialog, it does work: The folder shows the new icon and the desktop.ini file is created inside the folder with exactly the above format.
How can I make this work?
1Thanks! I only changed the attributes of the desktop.ini to system and hidden. I didn't know that also the folder needs the system attribute. Now it works! Thanks again! – user1580348 – 2015-02-25T15:05:26.460
However the desktop.ini created by Windows with the Properties dialog is encoded in ANSI, not in Unicode. See this screenshot from notepad++ http://i.imgur.com/xLtzQ7G.png
– user1580348 – 2015-02-25T15:09:47.137@user1580348: Yes, this is ONLY necessary to store the localized strings e.g. Arabic or Chinese. – duDE – 2015-02-25T15:40:57.977
Hi duDE, is it possible to add custom sections with name-value pairs to the desktop.ini file, or would this conflict with the normal operation? The reason is: In addition to the folder-icon functionality, I want to store other custom information in this file. – user1580348 – 2015-02-25T19:12:19.357
Try it out, I would say it's possible ... – duDE – 2015-02-25T19:54:34.213
Of course I've already tried it out and it seems to not conflict with normal operation. However, this could be different in the long-term. That's why I asked - it could be that somebody knows it better. That's why people ask questions here. No need to vote something down because someone asks a question... – user1580348 – 2015-02-25T21:25:53.180
The corrent encoding of desktop.ini should be UTF-8, to be exact! – Daniel – 2018-08-09T20:45:14.283