Custom folder icons are being reset

Get help for specific problems
Posts: 12
Joined: 26 Aug 2018

gunterotto

I've used Properties>Customize to change several folder icons in Windows 10 (20H2), see below. The problem is, if the folder is in <Exclude> for FFS - and only when I run a backup - it will be reset back to the non-customized blank folder icon. I can watch it change as the FFS routine completes! If a custom folder is NOT in <Exclude>, it does NOT change (_PC_MTCE folder for example). FFS is at 11.8.

Customization before sync:
Image
After running FFS:
Image

I have recreated this bug on two other PCs. On my desktop, and on my Surface Pro, where I run nightly ffs.batch, the icons will be reset. On my Surface Go, which has the same OneDrive folders but I do not run FFS backups, the icons do not reset. leading me to believe this is a FFS bug.

I've had this problem for two years, testing every Windows update before recently determining that it is FFS changing the icons during nightly backups. Interestingly, the custom icons do not show up in a search of in my Registry, only in the desktop.ini files. So I've tried removing desktop.ini from <Exclude>, but it makes no diff.

Desktop.ini:
[.ShellClassInfo]
IconResource=C:\OneDrive\...\Custom Windows 10 Folder Icon Location\archive.ico,0
[ViewState]
Mode=
Vid=
FolderType=StorageProviderGeneric

The desktop.ini file never changes, and there is no evidence of an icon in the Registry, so how does the folder icon reset???
Last edited by gunterotto on 29 Mar 2021, 19:31, edited 3 times in total.
Posts: 951
Joined: 8 May 2006

therube

(Your images are not valid links [for others to see].)
Posts: 12
Joined: 26 Aug 2018

gunterotto

Images should be ok now, thanks for the heads-up.
Posts: 951
Joined: 8 May 2006

therube

The desktop.ini should have the attribute of system, and the folder containing it also needs to have the attribute of system

Maybe the System attributes are being lost?

I created a directory, & modified it's icon (which then created a desktop.ini).
I then added a "folder picture" (not that I know what that does).
Both changes are reflected in desktop.ini.
The modified icon is what does display.
The folder picture (again not knowing what to expect) does not.

Then I created a subdirectory to that directory & copied desktop.ini into that subdirectory.
I expected (at least) that the icon would change, which it did not.
But as soon as I set the System attribute to that directory, it did.
(desktop.ini already had the System attribute set from my copy.)

Oddly ? the parent directory does not have the System attribute set, yet the expected icon does display.

(I'm on Win7.)
Posts: 12
Joined: 26 Aug 2018

gunterotto

Attributes are consistent with all other desktop.ini files. Note that the desktop.ini file (attrs/size/contents/date) does not change by FFS's actions, somehow the custom icon is dropped without affecting the .ini file or the registry?!?
Image
User avatar
Site Admin
Posts: 7065
Joined: 9 Dec 2007

Zenju

Remove "desktop.ini" from the default exclusion filter.
Posts: 12
Joined: 26 Aug 2018

gunterotto

Yes, thanks, but I should have mentioned that I'd removed desktop.ini some time ago to no avail. I've debugged a bit more and its actually the XCOPY (in a .bat) I run at "job completion" (to copy changed files from the versioning folder into _ARCHIVE and _HISTORY) that appears to be the culprit.

Even thought the ini file contents, date, and attributes are not changed at all, and there is no trace of the custom icon in Registry, as soon as I run XCOPY the custom icon disappears. So this problem is NOT within FFS, it appears to be a bug/quirk/feature of Windows. I've also tried ROBOCOPY but it still happens.

Thanks for the help, I'll focus on finding some way to automate a reset of my custom icons.
Posts: 12
Joined: 26 Aug 2018

gunterotto

SOLVED
In case someone stumbles on to this thread, the solution is to reset the folder attr to "read only". Who woulda thunk? Some more googling found this 6 year old post:
https://superuser.com/questions/806010/onedrive-subfolder-icons-keep-resetting