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 the language I may be using.
Assuming you're referring to MS-DOS batch files: as it is simply a text file with a special extension, a .bat
file doesn't store an icon of its own.
You can, however, create a shortcut in the .lnk
format that stores an icon.