Target directory question.

Got a problem you cannot solve? Try here.
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Target directory question.

Postby bokkie » Thu Jul 23, 2015 6:35 am

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?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Target directory question.

Postby FrancescoT » Thu Jul 23, 2015 12:08 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Target directory question.

Postby bokkie » Fri Jul 24, 2015 3:08 am

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. :)
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 146 guests