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.
You can just create a shortcut and then right click on it -> properties -> change icon, and just browse for your desired icon.
Hope this help.
To set an icon of a shortcut programmatically, see this article using SetIconLocation:
How Can I Change the Icon for an Existing Shortcut?:
Const DESKTOP = &H10&
Set objShell = CreateObject(“Shell.Application”)
Set objFolder = objShell.NameSpace(DESKTOP)
Set objFolderItem = objFolder.ParseName(“Test Shortcut.lnk”)
Set objShortcut = objFolderItem.GetLink
objShortcut.SetIconLocation “C:WindowsSystem32SHELL32.dll”, 13
objShortcut.Save