Page 1 of 1
How to set $TARGETDIR$ value from registry?
Posted: Fri Mar 30, 2012 10:29 am
by mhammady
Hi, I would like to set the $TARGETDIR$ value according to a stored path value in the registry. In IS, we used to run a VB script before install begin to read and setup this variable, but i don't know how to do that in IA.
Can any one please help?
Thx
Re: How to set $TARGETDIR$ value from registry?
Posted: Fri Mar 30, 2012 12:04 pm
by FrancescoT
Dear User,
Simply use the command "Read Registry " in your script.
For example:
Read Registry Key HKLM\\ into TARGETDIR
Regards
Re: How to set $TARGETDIR$ value from registry?
Posted: Fri Mar 30, 2012 8:34 pm
by mhammady
Thanks, but where exactly i need to put this script. I use the IA 2012 RAD studio edition...
Re: How to set $TARGETDIR$ value from registry?
Posted: Mon Apr 02, 2012 4:53 am
by FrancescoT
Dear User,
by defalut InstallAware intialize TARGETDIR in the project Main script, as below:
DEFINE REGION: Setup User Interview
if Variable MAINTENANCE Equals TRUE
GoTo Label: Maintenance
else
[compiler if Variable BUILDMODE not Equals PATCH]
Comment: First Time Install
Set Variable TARGETDIR to $PROGRAMFILES$\$TITLE$
Set Variable STARTMENU to $TITLE$
[compiler end]
end
So you could replace "Set Variable TARGETDIR to $PROGRAMFILES$\$TITLE$" ... or dependig on your needs somewhere else.
Regards