PDA

View Full Version : Runtime variable changes values



CleanFacets
07-15-2019, 12:17 PM
This is quite strange, used on a Windows 7 box, with developer edition 10.0.5710

Create %MyRuntimeVar% with default value 0
somewhere in the middle of the loop for dialog boxes
%FILEINUSE% = FUNCTION:Check In-use File(LocalFolder\Local file)
if %FILEINUSE% Equals "-1" THEN
Hide Wizard Dialog "$DLG_FILEISFOUND$"
Else
Set Variable %MyRuntimeVar% = 1
Show Wizard Dialog "$DLG_FILEISFOUND$"
End
Display value of %MyRuntimeVar%

The LocalFolder is empty, there are no files at all. When this is compiled with 10.0.5710, this works fine. When compiled with 10.0.5452.0, if you test %MyRuntimeVar% in an IF statement, the value is 1. I know, check other places in the script to see who else changes %MyRuntimeVar%. This is the only place that var is used.
I changed the script to:

if %FILEINUSE% Equals "-1" THEN
Set Variable %MyRuntimeVar% = 0
Hide Wizard Dialog "$DLG_FILEISFOUND$"
Else
Set Variable %MyRuntimeVar% = 1
Show Wizard Dialog "$DLG_FILEISFOUND$"
End
Display value of %MyRuntimeVar%

It then works with no issues in 10.0.5452.0

Too strange, and was just wondering if anyone else has had this issue.

Thanks,
Carl

linder
07-17-2019, 02:52 AM
Carl,

the latest SetupBuilder release is 10.0.6275. Build #5710 is dated November 26, 2017. I have checked our support database and we did not receive any similar report.

I would suggest to check this again with the latest #6275. BTW, what is the "real" value of your "LocalFolder\Local file"? I assume it's just a placeholder in the above code? And it would be great if you could post a screenshot from the whole Loop Wizard / End Statement.

Friedrich