About the installer package

New scripts

Starting November 2021 all new and updated AutoHotkey scripts use installer packages with the original un-compiled script file(s), an icon file, and logic to help you compile the script with AutoHotkey.

You can choose just to extract the script as-is without compiling it, to compile it, and to add a shortcut to the Windows Start menu.

This slideshow takes you through the setup process:

This happens during setup

You must have AutoHotkey 1.1 installed on your computer. It is checked that you have and that it is a sufficiently recent version. If not, you are guided to autohotkey.com so you can download and install it. After that you can run the setup package again.

You decide where to install the script (which folder).

You press Install, and the following happens:

The script file(s) and an icon file are copied to a subfolder called ‘src’.

The program ‘Ahk2Exe for AutoHotkey’ is then launched with all necessary parameters pre-filled.
You must press ‘Convert’, and when the conversion completes you must close ‘Ahk2Exe for AutoHotkey’.

The setup is now complete.

Your choices during setup

During setup you can also choose not to compile the script and just install it as-is.

Why?

  • Overall there is much less risk of anti-virus alerts than when ZwiftHacks offered compiled scripts for download, even if they were always false positives.
  • This approach also provides a high level of transparency and security for you:
  • You can see the full source code in the src folder which is created during installation.
  • You can see how and when the source code is transformed into an executable program.
  • You control the download and installation of AutoHotkey and the script compiler.

Other notes

The default install location is now the folder %AppData%\ZwiftHacks instead of Documents\Zwift\Scripts as for older scripts.

Older scripts

Until November 2021 the scripts here at ZwiftHacks were packaged differently. It still applies to the scripts which have not had an update after that time. The biggest differences were the install location and that pre-compiled scripts were distributed.

The script itself and any files it relies on (configuration files or supporting scripts) are packaged into an installer package. The installer is an executable file (.exe) made with Inno Setup.

When you run the installer the default is to install the script in a subfolder named ‘Scripts’ in your Documents\Zwift folder (where Zwift puts e.g. logs and .fit files in other subfolders).

The installer also creates a convenient shortcut in your Windows Start menu such as this:

zwift-scripts-shortcut-in-start-menu

If the package you downloaded contains script files and not a compiled program / executable remember that you still have to have AutoHotkey  installed on your PC to run the script. The installer package checks whether AutoHotkey is installed and will only let you complete the installation if it is.