How to change the icon of .bat file programmatically?

前端 未结 10 616
予麋鹿
予麋鹿 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:17

    You could use a Bat to Exe converter from here:

    http://www.f2ko.de/en/b2e.php

    This will convert your batch file to an executable, then you can set the icon for the converted file.

    0 讨论(0)
  • 2021-02-05 01:20

    Try BatToExe converter. It will convert your batch file to an executable, and allow you to set an icon for it.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-05 01:25

    One of the way you can achieve this is:

    1. Create an executable Jar file
    2. Create a batch file to run the above jar and launch the desktop java application.
    3. Use Batch2Exe converter and covert to batch file to Exe.
    4. During above conversion, you can change the icon to that of your choice.(must of valid .ico file)
    5. Place the short cut for the above exe on desktop.

    Now your java program can be opened in a fancy way just like any other MSWindows apps.! :)

    0 讨论(0)
提交回复
热议问题