I'm trying to build a Firefox add-on which lets you create executable files which can be associated with a default program or added to the "Open With" list and possess its own icon.
I was hoping to avoid having the add-on compile files into exes, but...
- It does not seem batch files can have their own icons.
- Although one can pass batch instructions to cmd.exe via shortcut (and shortcuts can have their own icons) and a shortcut can even accept arguments (as in dropping files onto it), one apparently cannot add shortcuts to the "Open with" menu (the Open With dialog treats the shortcut as equivalent to the referenced executable, in this case, .exe, and without the extra parameters).
So, I'd like to know what other approaches might be available to me for building executables (or something that really functions like an executable) in a simple and transparent manner? I am leaning toward packaging an open-source batch-to-exe converter like http://sourceforge.net/projects/bat2exe/ (though I'd really hope to find one which itself can be controlled via command line) so I can build a batch file programmatically and then turn it into a full-blown executable with icon.
The primary reason I want to do this is for the sake of https://github.com/brettz9/webappfind . WebAppFind lets you open desktop files (while you are on your desktop) into web applications and currently comes with pre-built executables which can be associated with a given file extension (to work with Open With or as a default handler). These executables will be used to call Firefox (and my add-on, WebAppFind) with certain flags that allow WebAppFind to open the file in a web app (as determined by other factors like a filetypes.json file in the same directory as the file or a previously registered protocol handler correlated to the file extension, as explained at the repo).