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
How to set $TARGETDIR$ value from registry?
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to set $TARGETDIR$ value from registry?
Dear User,
Simply use the command "Read Registry " in your script.
For example:
Read Registry Key HKLM\\ into TARGETDIR
Regards
Simply use the command "Read Registry " in your script.
For example:
Read Registry Key HKLM\\ into TARGETDIR
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
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
Re: How to set $TARGETDIR$ value from registry?
Thanks, but where exactly i need to put this script. I use the IA 2012 RAD studio edition...
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to set $TARGETDIR$ value from registry?
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
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
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
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

