Inno setup - relative path to ReadIni

inno-setup

Solution

Use the `SourcePath` predefined variable, like this:

SourcePath str. Points to the directory where the current script is located, or the My Documents directory if the script has not yet been saved.

#define MyAppVersion ReadIni(SourcePath + "\Install.ini", "Release", "VersionNumber")

[Setup]
AppName=My Program
AppVersion={#MyAppVersion}

Problem

How can I set relative path to ini file in ReadIni? This works: ``` #define MyAppVersion ReadIni("C:\Users\Popov\Documents\Release\Install.ini", "Release", "VersionNumber") ``` But I want this: ``` #define MyAppVersion ReadIni("Install.ini", "Release", "VersionNumber") ``` Where Install.ini is in the inno script folder.

Original source