So I have a function that is updating some XML and I would like to pass the {AppVersion}
that has been set in the [Setup]
part of the script as a constant to this function
I have tried
MyFunction(ExpandConstants({AppVersion})
But this gives me an error? How do I pass this constant to my function correctly
My Code
[Files]
Source: ".\Source\myfile.txt"; DestDir: "{app}\System"; AfterInstall: MyFunction('{#SetupSetting("AppVersion")}')
[Setup]
AppId=MyApp
AppName=My Application
AppVersion=011
DefaultDirName=C:\MyApp
[Code]
procedure MyFunction(Text: String);
begin
MsgBox(Text, mbInformation, MB_OK);
end;