Breaking within Wizard Loop
I am finding that the variable %_SB_DIALOGNEXTID% used by the Loop Wizard is being reset to 0, causing an infinite loop, when "Break Loop" is executed in the inner loop of the code below. Is this an expected behavior or am I doing something improperly?
Loop Wizard
Wizard Auto Break
If %_SB_DIALOGID% Equals "$LICENSEAGREEMENT$" Then
Set Variable %DRIVES_FOUND% to GetSystemInfo(Enumerate Disk Drives)
Set Variable %DRIVE_COUNT% to CountListItems(%DRIVES_FOUND%)
Loop
Set Variable %LOOPCOUNT% to (Increment Variable by 1)
Set Variable %DRIVE_LETTER_TO_TEST% to GetListItem(%DRIVES_FOUND%, %LOOPCOUNT%)
Set Variable %VALID_FMG_ELIGIBLE_DRIVE% to GetSystemInfo(Drive Type) of "%DRIVE_LETTER_TO_TEST%"
! If network drive or hard drive, look for existing files
If %VALID_FMG_ELIGIBLE_DRIVE% Equals "$DRIVE_REMOTE$" Or %VALID_FMG_ELIGIBLE_DRIVE% Equals "$DRIVE_FIXED$" Then
Set Variable %FMGMASTR_ALREADYEXISTS% to Search for File("FMGMASTR.EXE")
If %_SB_ERRORCODE% Equals "1" Then
! Reset install path if existing one is found
Set Variable %_SB_INSTALLDIR% to %FMGMASTR_ALREADYEXISTS%
Break Loop
End
End
End
End
End
Re: Breaking within Wizard Loop
Joe,
I'll check this and get back to you.
Thanks,
Re: Breaking within Wizard Loop
Re: Breaking within Wizard Loop
Joe,
This was a bug and has been fixed now. Thanks for bringing this to our attention!
Re: Breaking within Wizard Loop
Freidrich:
Thanks for your help with the original problem. I am having a problem with another section of this same code.
Set Variable %FMGMASTR_ALREADYEXISTS% to Search for File("FMGMASTR.EXE")
This is my development/test machine so I happen to have quite a few directories where this exe exists. I am looping through all drives that might contain this exe. The second time this line is executed I am getting a buffer overrun or a gpf. The buffer overrun seems to happen if I run the program and the gpf if I debug the program. I do know it dies on this line in the script. I can't tell from this if this is a data issue or a buffer overrun from too many occurances for the result string to handle. Your documentation gives no indication of the maximum length allowed for the destination string. If it is quite large I suspect the data value within one of my directory paths. I have attempted to dump the result into a debug string but nothing is getting to dbgview. I seem to see only a small portion of the result string when viewing the variable from within debug mode. (even when using scrolling)
I also have a second question. Can this %FMGMASTR_ALREADYEXISTS% variable be loaded into the "Combo Box Text" argument of a Combo Box dialog.
I would like to present all existing paths to the client to choose as an existing alternate install path.
Re: Breaking within Wizard Loop
Joe,
Unfortunately, I cannot reproduce this here. But variables have a maximum of 1024 bytes, so perhaps this causes the problem.
You said you can only see a small portion of the result string. Could you please send me a screen-shot?
Thank you for your help!
Re: Breaking within Wizard Loop
Quote:
Originally Posted by Joe Snyder
I also have a second question. Can this %FMGMASTR_ALREADYEXISTS% variable be loaded into the "Combo Box Text" argument of a Combo Box dialog.
I would like to present all existing paths to the client to choose as an existing alternate install path.
Yes, no problem. Search for File returens the following:
path1|path2|path3|...
Combo Box Text requires the follwing format:
|path1|path2|path3|...
Just do the following:
Add %FMGMASTR_ALREADYEXISTS% to your "Combo Box Text" argument of a Combo Box dialog.
Then add this:
Set Variable %TEST% to Search for File("yourfilegoeshere.exe")
Set Variable %FMGMASTR_ALREADYEXISTS% to |%TEST%
Does this help?
Re: Breaking within Wizard Loop
Yes thanks
I had it all there I just wasn't adding the '|' at the beginning.