I'll add mention of an open source utility I wrote long ago called IconJ. Its Readme description reads:
IconJ significantly enhances the IconX program, and is 100% compatible. It
allows scripts to be executed by double-clicking the script's icon.
Abilities include joining the script with the icon file itself, or calling
it from any directory or disk, executing either AmigaDOS or ARexx scripts,
outputting to any file or device, running interactive scripts and scripts
that contain conditionals, and creating relative console windows. Includes
a utility called AtatJ which attaches or detaches a script to/from an icon
I forgot which Fish Disk it is on, but it can be obtained from Aminet:
It comes with the source, written in JForth. (You don't need JForth to run it, though.) Being able to store the script within the icon file itself is advantageous, especially in situations where there is both a script to set up stuff, and a separate executable. Now the icon drags the whole set of them at once.