View Single Post
Old 10th August 2010, 05:42   #4
Major Dude
Join Date: Oct 2006
Posts: 1,892
As he said, the File command is evaluated at compile time (that means when the installer is being compiled). I think you want to read the INI at the *user's* computer, so you cannot do different File commands for different INI values (obviously).

PHP Code:
ReadINIStr $EtudeName $DESKTOP\Data.ini "Data" "EtudeName"
${If} $EtudeName == "Tomcat 6.0"
File "C:\Program Files\Admin builder\Tomcat"
${ElseIf} $EtudeName == "Tomcat 5.0"
File "C:\Program Files\Admin builder\Tomcat"
${ElseIf} $EtudeName == "Tomcat 5.1"
File "C:\Program Files\Admin builder\Tomcat"
Note: Because you want to install a different file for every value in that ini, your installer will probably end up being rather big.

(If you want to read the INI on the *compiler's* computer, then you cannot use ReadINIStr because you have to use compile-time commands. There is no standard compiletime command to read INI strings. You can use a vbscript, or an exe file you created yourself, or whatever.)
MSG is offline   Reply With Quote