This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Numerical value in InstallAnywhere
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 11, 2018
08:24 PM
Numerical value in InstallAnywhere
I essentially have written a while loop in an InstallAnywhere project. What I would like to find is an easy and simple way to implement a counter inside this "While loop". Here is some pseudo code of my attempt:
Set InstallAnywhere Variable: $COUNT$ = 0
Jump Label: while
Execute Script/Batch File:
@echo off
set /a TEMP_NUM=$COUNT$+1 > nul
echo %TEMP_NUM%
Set InstallAnywhere Variable: $COUNT$ = $EXECUTE_STDOUT$
Jump: while Rule: $COUNT$ [Less Than or Equal to] 100
The above code sets $COUNT$ to the following:
Loop 0:
1
Loop 1:
1
Loop 2:
1
...
I wonder if this happens because InstallAnywhere is replacing $COUNT$ inside the batch file with 0 in the first loop, and then in subsequent loops it re-uses the same batch file with $COUNT$ already substituted in (like in a batch for loop or if statement).
Best Regards,
Bala Krishna VoIP Phone
Set InstallAnywhere Variable: $COUNT$ = 0
Jump Label: while
Execute Script/Batch File:
@echo off
set /a TEMP_NUM=$COUNT$+1 > nul
echo %TEMP_NUM%
Set InstallAnywhere Variable: $COUNT$ = $EXECUTE_STDOUT$
Jump: while Rule: $COUNT$ [Less Than or Equal to] 100
The above code sets $COUNT$ to the following:
Loop 0:
1
Loop 1:
1
Loop 2:
1
...
I wonder if this happens because InstallAnywhere is replacing $COUNT$ inside the batch file with 0 in the first loop, and then in subsequent loops it re-uses the same batch file with $COUNT$ already substituted in (like in a batch for loop or if statement).
Best Regards,
Bala Krishna VoIP Phone
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 18, 2018
12:04 PM
Yeah, I tried it myself. This should work but doesn't. Thought it might have to do with the Evaluate variables on assignment checkbox, but no.
I'd recommend doing it in java with a custom code jar.
I'd recommend doing it in java with a custom code jar.