Every now and then people ask me how they can distribute other files along with their Macro Scheduler executables, such as DLLs or image files that your script requires.
All software publishers face this problem and usually use an Install file creator, such as the free Inno Setup. You create a package of files and define how they are installed as well as what shortcuts to create etc. Most software you download is installed using software like this.
For small packages you might get by with a simple zip file, or, better, a self extracting zip file. WinZip will create one of these for you. There’s also a tool that already comes with Windows called iexpress.exe. Click Start/Run and type iexpress.exe and hit Enter.
This starts the IExpress Wizard which walks you through creating a self-extracting or self-installing package. It’s very simple to use. Just choose the files you want to be included in the package and select which one should be run on completion. You end up with an EXE you can give to your users/customers which when run will extract the files to a temporary folder and run your main script executable.
Another way is to embed the files directly into your script and have your script extract them at runtime before it does anything else. Dick Lockey describes a way you can do that here. The next version of Macro Scheduler, version 11, makes this easier. It will include a tool to import any binary file into the script and a function called ExportData to create the file at runtime. If you use this method remember to write the files to somewhere you have access to. In a least privileged user environment that won’t necessarily be the EXE’s program folder. The temp folder might be safest. And if you do that, delete them afterwards.