check if value is lower than ...

Common questions about using Actual Installer.
Post Reply
wbtcpip
Posts: 10
Joined: Wed Oct 24, 2012 11:10 am

check if value is lower than ...

Post by wbtcpip »

in the following page https://www.actualinstaller.com/help/commands.html you explain how to check if a variabile is equal or not equal

File: IF <var1>=<var2>
File: IF <var1>!=<var2>

but in my case i want to check if <var1> is lower than 9 ... what is the syntax to check this?
Leo
Site Admin
Posts: 479
Joined: Fri Jan 22, 2010 12:40 pm

Re: check if value is lower than ...

Post by Leo »

For the commands MSG(), HALT(), STOP, EXIT, this is not supported.
For file operations, use the following:

Code: Select all

File: 		<SystemDir>\cmd.exe
Parameters: 	/C IF /I <Variable> LSS 9 (file command here)
https://ss64.com/nt/if.html
Leo,
Actual Installer Team
https://www.actualinstaller.com
wbtcpip
Posts: 10
Joined: Wed Oct 24, 2012 11:10 am

Re: check if value is lower than ...

Post by wbtcpip »

thank you. would it be possible to support it in the next update?

i need to check if a numeric value in the windows registry is lower than the expected and eventually HALT the installation
Leo
Site Admin
Posts: 479
Joined: Fri Jan 22, 2010 12:40 pm

Re: check if value is lower than ...

Post by Leo »

We will try to add it in next release.

For now, you may try the following trick:
use Custom Prerequisites: add a condition "Variable Less or Equal".
The command field leave empty.
Also, you need to edit the text for for this prerequisite: go to Interface/ Languages/ and double-click English.
Change the line:
[Messages]
7=
Leo,
Actual Installer Team
https://www.actualinstaller.com
Leo
Site Admin
Posts: 479
Joined: Fri Jan 22, 2010 12:40 pm

Re: check if value is lower than ...

Post by Leo »

Just released a new version 10.1 which supports this operation.
Please use the following code:

Code: Select all

File: IF <Variable><9
Parameter: HALT(message)
Leo,
Actual Installer Team
https://www.actualinstaller.com
wbtcpip
Posts: 10
Joined: Wed Oct 24, 2012 11:10 am

Re: check if value is lower than ...

Post by wbtcpip »

Thank you
Post Reply