Marcus' Macro Blog

Mostly tips, tutorials, articles and news about Macro Scheduler & Windows Automation
 

Packaging files with your EXEs

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.

[Post to Twitter] Tweet This

3 Responses to “Packaging files with your EXEs”

  1. Rudy says:

    Help. We are planning to create executables with our Macro Scheduler Pro and push them out to our Customer Service Team. We bought many copies of Quickbuttons to trigger the executables.
    Is there any way to push a standard set of buttons with Quickbuttons or do we have to go to each PC and set up on an individual basis? This could amount to hundreds when fully implemented.

    Thanks much

  2. QuickButtons uses the registry to store details about each button bar. Look under HKCU\Software\QuickButtons. You will see a registry hive for each button bar. So all you need to do is export this key to a .reg file. Then to import the button bar on the target machine, just execute the .reg file. This could be done by a Macro Scheduler macro.

  3. Rudy says:

    Thanks much. I really appreciate the support.

Leave a Reply