|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 2
|
Multiple Install Paths
Hi,
I am trying to update a previous installer (one that I did not write) to handle installing on Vista. The way it is now, the default installation directory is "$PROGRAMFILES\[app name]". This is to remain the same. What I need is to set a different path when the installer in running on Vista. I thought I had a good (one that would work) method to accomplish this but seem to have run into a snag. The following is part of what I have / do. First, I use GetVersion::WindowsName and store it in $R0. Next, I used this ${if} $R0 == "Vista" StrCpy "$DefaultDir" "$APPDATA\[app name]" ${else} StrCpy "$DefaultDir" "$PROGRAMFILES\[app name" ${endif} where DefaultDir is just a variable I declared. When I go to set the default installation directory I thought using InstallDir "$DefaultDir" would work, but when the option to select the default directory would happen, that field is blank and I must browse to get the path. Any ideas on how I can go about getting this to work properly? Any suggestions would be greatly appreciated. thanks |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Much easier:
code: The ${If} block can go in .onInit or anywhere before the directory page. Stu |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2007
Location: Italy
Posts: 99
|
hi,
If you are using MUI you should define set $INSTDIR value: quoting from MUI manual MUI_DIRECTORYPAGE_VARIABLE variable Variable in which to store the selected folder. Default: $INSTDIR |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jan 2008
Posts: 2
|
Thanks for the quick replys. I'll try that.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|