How to change the icon of .bat file programmatically?

前端 未结 10 622
予麋鹿
予麋鹿 2021-02-05 00:45

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

10条回答
  •  孤独总比滥情好
    2021-02-05 01:21

    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.

提交回复
热议问题