Take %UserProfile%\Desktop\desktop.ini
for example.
- Create a desktop.ini file with content below and saved in UTF-16 LE with BOM. Hopefully notepad.exe has such choice to use the right encoding.
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769
IconResource=%SystemRoot%\system32\imageres.dll,-183
- Change desktop.ini's attributes to
+A +S +H
(Archived, System, Hidden)
attrib +A +S +H %UserProfile%\Desktop\desktop.ini
- Change
%UserProfile%\Desktop
folder's attributes to+R
(Read-only)
attrib +R %UserProfile%\Desktop
- Restart explorer.exe
If it doesn't work, try attrib +S %UserProfile%\Desktop
.
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779
InfoTip=@%SystemRoot%\system32\shell32.dll,-12688
IconResource=%SystemRoot%\system32\imageres.dll,-113
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-236
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798
IconResource=%SystemRoot%\system32\imageres.dll,-184
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21796
IconResource=%SystemRoot%\system32\imageres.dll,-115
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-173
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21810
IconResource=%SystemRoot%\system32\imageres.dll,-185
DefaultDropEffect=4
[LocalizedFileNames]
Desktop.lnk[email protected],-21769
Downloads.lnk[email protected],-21798
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790
InfoTip=@%SystemRoot%\system32\shell32.dll,-12689
IconResource=%SystemRoot%\system32\imageres.dll,-108
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-237
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791
InfoTip=@%SystemRoot%\system32\shell32.dll,-12690
IconResource=%SystemRoot%\system32\imageres.dll,-189
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-238
Update: These are no longer accurate for windows 11.
I admittedly do not know what the certain indexes are, as evidenced by my delving into these threads, but the resources for
Documents
are incorrect.the following is valid for Windows 11, however, I still haven't been able to figure out the icon index for
IconResource
.The Windows 10 icon is available in Windows 11 via index
184
, i.e.IconResource=%SystemRoot%\system32\imageres.dll,-184
obviously, this icon doesn't quite match the others, but until I or someone else messes around enough to find the correct one, this will at least do.