# Windows – How can a script add a little icon overlay on files’ icons

batchiconswindows 7

Just like Dropbox does, I'd like to show if a file is backed up using the icon overlay. How could this be done, without human intervention and regarding a specific computer so it doesn't have to be distributable.

This question regards only how to add/change this icon small overlay, not how to check if the files are backed up.

I am aiming at Windows 7 at the moment.

Said DLL needs to implement certain interfaces (IUnknown and IShellIconOverlayIdentifier as far as I can tell) and will be called by the Windows explorer process upon displaying an icon. For this to happen you need to create an entry in the registry. As you probably want that overlay to be displayed for all types of files you will probably need to register for a general file type.
Later on GetOverlayInfo will be called to register your icon and IsMemberOf to indicate whenever or not you want your overlay to be displayed.
If you look at this help article for DropBox you will see that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers could/would also be important in order to decide which icons are going to be displayed.