I\'d like to know what\'s the way to actually set the icon of a .bat
file to an arbitrary icon.
How would I go about doing that programmatically, independently of t
The icon displayed by the Shell (Explorer) for batch files is determined by the registry key
HKCR\batfile\DefaultIcon
which, on my computer is
%SystemRoot%\System32\imageres.dll,-68
You can set this to any icon you like.
This will however change the icons of all batch files (unless they have the extension .cmd
).