EN RU
Log in
Home
Download
Purchase
Documentation
Support
Contact us
 
Help  /  FAQ

How to use environment variables when creating an installation

Sometimes you may need to use the current environment variables like %VARNAME% in the project when creating the installation. For example, you need to specify a file or output directory as %MYPATH%\Folder. This can be useful when the same project is used on computers with different settings. You can not specify environment variables directly in the project parameters, but you can use global variables for these purposes.

As you know, global variables can be defined as common for all projects through the menu item Tools - Global Variables or you can define global variables for a particular project in the Project - Preprocessor - Multi-Builder settings. In our example, we just need to add a global variable:

Variable name: mypath
Value: %MYPATH%\Folder

and then use it in the project settings as $mypath$.

Eonza automation software - free, open source cross-platform program for easy creation and management of scripts.
  • Help
    • Introduction
    • Get to know CreateInstall
    • Compare installers
    • License Agreement
    • License Light
    • License Free
    • Program features
    • Command Reference
    • FAQ
      • Antivirus false positives
      • Command Prompt Mode
      • How to create shortcuts
      • How to get Control ID
      • How to sign an installation
      • How to use environment variables
      • Installing 64-bit applications
      • Local variables
      • Portable version
      • Unpacking filter
      • Common dialog parameters
      • Custom dialog function
      • Global variables
      • How to move and resize controls
      • How to use If Condition
      • Language-dependent variables
      • Multi build setups
      • Predefined folders
      • Predefined variables
      • Variables of dialogs
    • Examples & tips
    • CreateInstall Assistant
    • Problem solving
    • Setup Extractor
Copyright © Novostrim, OOO, 2009-2026 All rights reserved.