This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Custom-install value of INSTALLDIR
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 07, 2011
02:39 PM
Custom-install value of INSTALLDIR
Basic MSI project in InstallShield 2011.
There's a need to set some user environment variables. Under System Configuration -> Environment Variables, I configured the name and value. The value needs to be a subdirectory named "SDK" under the installed directory so I set it to "[INSTALLDIR]SDK". This works fine as long as the user doesn't change the default install directory. If they do, the environment variable is still set to the default instead of the custom.
I tried using an InstallScript custom action, setting the environment variable into the "Environment" key of HKEY_CURRENT_USER. The values are set (let's hear it for InstallScript) but again, it always uses the default value of INSTALLDIR even if I choose a custom install directory.
What is the proper way to specify the true value of INSTALLDIR whether customized or default?
By the way, Hi everyone. I'm back. Again.
There's a need to set some user environment variables. Under System Configuration -> Environment Variables, I configured the name and value. The value needs to be a subdirectory named "SDK" under the installed directory so I set it to "[INSTALLDIR]SDK". This works fine as long as the user doesn't change the default install directory. If they do, the environment variable is still set to the default instead of the custom.
I tried using an InstallScript custom action, setting the environment variable into the "Environment" key of HKEY_CURRENT_USER. The values are set (let's hear it for InstallScript) but again, it always uses the default value of INSTALLDIR even if I choose a custom install directory.
What is the proper way to specify the true value of INSTALLDIR whether customized or default?
By the way, Hi everyone. I'm back. Again.
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 08, 2011
08:20 PM
A screenshot of Environment Variables view with the environment variable in question and Directory table may shed some light on the behavior. And a verbose installation log will be helpful too.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2011
04:58 PM
They look correct. I just tried it w/ a skeleton project (IS2011 Basic MSI) and it works as expected, default value and not.
Without verbose installation log, one will need to know whether it is INSTALLDIR or NEW_DIRECTORY1 that's changed; and how and when in sequence the property is changed during installation.
Without verbose installation log, one will need to know whether it is INSTALLDIR or NEW_DIRECTORY1 that's changed; and how and when in sequence the property is changed during installation.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2011
05:15 PM
Could you let me know how to generate the installation log?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2011
06:31 PM
For Basic MSI, you can pass your .msi file to msiexec.exe as a parameter. Use double quotes if there is whitespace in the path.
msiexec.exe /i\your.msi /l*vx \verbose.log
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2011
08:25 PM
TsungH wrote:
For Basic MSI, you can pass your .msi file to msiexec.exe as a parameter. Use double quotes if there is whitespace in the path.msiexec.exe /i\your.msi /l*vx \verbose.log
Thanks. I've attached verboselog.txt. Interestingly, I can't find a mention of changing the value of INSTALLDIR when I change it in the "Custom Install" dialog. The secondary INSTALLDIR from an included merge module is changed but not the primary one. However, all the files are installed to the location I selected.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2011
04:22 PM
Solved. The project had been designed such that the base target directory was never exposed in the Custom Install. Only the sub-features' target directories could be changed. Since changing those targets didn't change INSTALLDIR, it makes sense that later references to INSTALLDIR would use the default value.
I solved it by adding a base feature to the project, moving the other features below it and removing the ability to change the target directory for the sub-features.
Thanks for your help.
I solved it by adding a base feature to the project, moving the other features below it and removing the ability to change the target directory for the sub-features.
Thanks for your help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2011
11:20 PM
I am a little late, got tied up by work. Glad that you have solved it.