Self-created desktop.ini does not work
The desktop.ini should have the attribute of system, and the folder containing it also needs to have the attribute of system for it to have an effect.
Use the following procedure to customize a folder's style with Desktop.ini:
- Use PathMakeSystemFolder to make the folder a system folder. This sets the read-only bit on the folder to indicate that the special behavior reserved for Desktop.ini should be enabled. You can also make a folder a system folder from the command line by using attrib +s FolderName.
- Create a Desktop.ini file for the folder. You should mark it as hidden and system to ensure that it is hidden from normal users.
- Make sure the Desktop.ini file that you create is in the Unicode format. This is necessary to store the localized strings that can be displayed to users.
There is a very easy way to set the relevant attributes for the folder and its desktop.ini
simply using Explorer.
- Create the
desktop.ini
file and save it in the top level of the folder. If you are using Notepad or something similar, make sure to save it as type "All Files" so that it does not save asdesktop.ini.txt
. The encoding is not important if you are not using any special characters. - Click
Properties
in the folder's right-click menu and open theCustomize
tab.* - Click
OK
(notCancel
or the X in the corner). There is no need to change any settings.
The folder's and desktop.ini
's attributes have now been automatically set. The folder's displayed icon also refreshes immediately, without requiring deleting iconcache.db
or restarting the computer. This also causes desktop.ini
to disappear if Explorer is set to hide protected operating system files.
I have verified that this method works on Windows 7 and Windows 10.
*If you can't see the Customize
tab, try right clicking the folder and then clicking Open Folder Location
, then proceeding.