cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RGfocus
Level 3

INSTALLDIR not initialized

In my installscript MSI project, INSTALLDIR is not initialized before OnBegin, and I'm not able to initialize INSTALLDIR "manually" in the script (OnBegin or OnFirstUIBefore) as before.

Second time this happened, same thing happened yesterday. Running IS2009 Premier - eval ed. SP1 is not installed, was unable to install it (guess it's because I'm running eval. ed). Why I'm running eval. ed.? The dealer/reseller in Norway doesn't distribute IS any more, and Acresso seem not to have a clue where to buy a new license - believe it or not...

Any ideas how to find the error? My guess is the MSI tables are corrupt.. I checked ISYourCompanyDir and ISYourProductDir in the Directory table, both look unchanged. Not sure where to go from there..
Thanks in advance.
Labels (1)
0 Kudos
(3) Replies
RGfocus
Level 3

After pulling my hair out (what's left of it) I finally found out what's happening. INSTALLDIR is not initialized and cannot be set in the script if no components have INSTALLDIR as destination. Smells like a bug to me. I only had one component with INSTALLDIR as dest., and the problem occurred when I deleted it. (I was using my own directories and FeatureSetTarget on all the other components/features. )
Mystery solved:)
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

INSTALLDIR would be initialized to its default value by the CostFinalize action (assuming this is not an InstallScript MSI project using the MSI 4.5 embedded UI support). CostFinalize will run prior to the OnBegin event.

INSTALLDIR will not retain any value set from first time installs to maintenance installs if there are no components using INSTALLDIR as a destination. This occurs because Windows Installer does not register Directory table paths if they are not used by any components.
0 Kudos
RGfocus
Level 3

Seems like a reasonable explanation - thanks a lot Josh!
0 Kudos