Reputation: 1638
At the top of my script I am defining a version number of a dependency for a program.
#define ProductTestsVer "4.13.0.128"
I then use this identifier within the Files
section in a Check
function.
Source: src\ff\ProductTests.exe; DestDir: {app}; Check: RegCheck('Software\FFNVNTest\ProductTests', {#ProductTestsVer});
I then attempt to use the same Check
function within the Run
section, leading to the follow error:
Directive or parameter "Check" expression error: Invalid symbol '.' found.
I assume that I'm either making a stupid mistake or that you simply can't use identifiers within the Run
section, but I highly suspect it's the former.
Thank you.
Upvotes: 1
Views: 504
Reputation: 202594
I do not think you are right. That syntax cannot (and does not) work even in the [Files]
section. Tested with the latest Inno Setup 5.5.9 (both Ansi and Unicode).
If you check a preprocessor output, you will see that your syntax resolves to:
RegCheck('Software\FFNVNTest\ProductTests', 4.13.0.128);
That is not valid Pascal Script code. You probably wanted:
RegCheck('Software\FFNVNTest\ProductTests', '4.13.0.128');
So you need to use:
RegCheck('Software\FFNVNTest\ProductTests', '{#ProductTestsVer}');
Upvotes: 1