Page 1 of 1

Target directory question.

Posted: Thu Jul 23, 2015 6:35 am
by bokkie
If I display the value of the $TARGETDIR$ variable it shows the full pathname correctly.

In any project select the Design tab in the IDE. Select the Project Properties and look at the Target Folder: setting which in my project is $PROGRAMFILES$\$TITLE$.

If I display my $TITLE$ variable the value displayed is correct.

But if I try and display $PROGRAMFILES$ it displays "$PROGRAMFILES$" literally and not what it contains. I feel a bit of a numpty for asking, but if the Design tab shows $PROGRAMFILES$ then that implies there is a variable containing something? If there is why does the MessageBox statement not display it's value?

Re: Target directory question.

Posted: Thu Jul 23, 2015 12:08 pm
by FrancescoT
Dear Peter,

by default the "PROGRAMFILES" is defined and populated within the "[Define Setup Globals] code region". That said if you try to get its value before such script region the variable will be as NULL.

Note also that the "TITLE" and "TARGETDIR" are pre-defined variables, while "PROGRAMFILES" is not.

For example; "TARGETDIR: Initial value set to <Program Files Directory>\Application Title, using the name of the product being installed as the application title."

Hope this clarifies your doubt.

Regards

Re: Target directory question.

Posted: Fri Jul 24, 2015 3:08 am
by bokkie
Thanks. That explains it and it all works okay now. The answer was right under my nose. As I often remind myself; if it was a snake it would have bitten me. :)