How to change icon for favorites shortcuts to SMB folders?

Folder icons (including when they're displayed as favorites) come from Windows.

I don't think Windows supports customizing the icons of network folders. (Probably for performance reasons. Maybe also because the icon path on one machine may not work on another, unless the icon had to be stored within the folder itself.)

You may be able to manually create a desktop.ini file but I am not sure if Windows looks for them on network drives. It also reportedly does not work if the other end is a Linux server. There's some discussion here: