So, I have a function that updates some XML, and I would like to pass the {AppVersion} that was set in the [Setup] part of the script as a constant for this function
I tried
MyFunction(ExpandConstants({AppVersion})
But does this give me a mistake? How to 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;
user1 source share