How to define user variables and use "if" commands
I am searching for a way to define a user variable and assign a value.
Then, later, I want to access this variable value again in an "if" construction.
I want to avoid asking the user multiple times the same question.
It should work similar to:
MessageBox IDYESNO "Do you want to install version A?" IDNO no
$myvariable="A"
InstallDir "C:\project\versA"
Goto next
no:
$myvariable="B"
InstallDir "C:\project\versB"
next:
...
Section "blah1"
...
if ($myvariable == "A")
File /oname=karl.txt C:\projectA\bin\karl.txt
else
File /oname=karl.txt C:\projectB\bin\karl.txt
....
SectionEnd
Section "blah2"
...
if ($myvariable == "A")
File /oname=paul.txt C:\projectA\bin\paul.txt
else
File /oname=paul.txt C:\projectB\bin\paul.txt
....
SectionEnd
Section "blah3"
...
if ($myvariable == "A")
File /oname=peter.txt C:\projectA\bin\peter.txt
else
File /oname=peter.txt C:\projectB\bin\peter.txt
....
SectionEnd