如何以编程方式更改.bat文件的图标? [英] How to change the icon of .bat file programmatically?
本文介绍了如何以编程方式更改.bat文件的图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道将.bat
文件的图标实际设置为任意图标的方式.
与我可能使用的语言无关,我将如何以编程方式做到这一点.
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.
推荐答案
假定您是指MS-DOS批处理文件:由于它只是带有特殊扩展名的文本文件,因此不会存储.bat
文件自己的图标.
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.
但是,您可以创建.lnk
格式的快捷方式来存储图标.
You can, however, create a shortcut in the .lnk
format that stores an icon.
这篇关于如何以编程方式更改.bat文件的图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文