InstallAware for Windows Installer Header Image Windows Installer without Rocket Science
InstallAware for Windows Installer
 

Include Script

This command inserts code from a setup script file into the current position in the active script. The Include Script command adds a great amount of versatility and power in sharing code across different setup projects, breaking up complex scripts into logical, re-usable units; and building code libraries that perform specialized tasks.

Script

Enter the name of the script file to include here, without file path or extension information. Clicking the down arrow will scroll through the list of script files that are already a part of the setup project and can be included.

Return Result in Variable

If the included script returns a result, type in a variable name here to capture that result within the given variable. Clicking the down arrow will scroll through the list of variables that are already defined in your setup project.

Use only a previously defined variable in this field. Do not enter a new undefined variable name. While entering a new and undefined variable name is technically legal and will work, the variable will not be recognized during script compilation by commands which require pre-initialized variables (unless it has been explicitly defined before).

Although commands typically support initializing variables on-the-fly, the special compiler parsing necessitated by this particular command creates an exception to this pattern.

 Notes

  • The insertion occurs at compile time.
  • Include scripts cannot refer to themselves or one another recursively. Include scripts are not seperate program segments like functions with their own stack, local scope, and variables; they are instead direct includes of commands (much like include files in the C++ programming language).
  • The included script must already be a part of the current setup project for the compilation to succeed. See modifying include scripts for more information.