cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
emmanuelc
Level 4

INSTALLDIR Points to the wrong directory on package update

I am using Installshield 2019 and am trying to modify my web app IS project to install a new version.

I am finding that a clean install works fine and the files all go where they are supposed to, but if I try to update a previous version then the INSTALLDIR is incorrect and puts some files in an wrong directory.   Specifically, it seems to select one of the existing subdirectories   as the new INSTALLDIR so the files go there.

This appeared to start when I added some components to the install.    Removing those components did not fix it, it just chose another wrong folder, a different one this time.    I tried to reset the INSTALLDIR with an MsiSetProperty in InstallScript, but it does not seem to take and continues to use the incorrect folder that it selected before.

I saw a similar problem where the solution was to add a component that had INSTALLDIR as its target and I have tried that but that also has not worked.    

Any help much appreciated.

Thanks

 

Labels (1)
0 Kudos
(3) Replies
Jenifer
Flexera Alumni

Hi @emmanuelc ,

 

  • When you say update,which type of upgrade it is?
  • If minor upgrade it isn't advised to add/remove new components.Though adding file via indirect ways are suggested.
  • What is the type of InstallShield project it is?If installscript can you try adding logs and see or messageboxes if that could show where exactly INSTALLDIR gets changed?

 

Thanks,

Jenifer

0 Kudos

Its a minor upgrade.   And yes it adds new components.

I have attached the setup log below, it you do a search on INSTALLDIR you will see that it initialises the value

MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API'.

and the shortly later it modifies it 

MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Modifying INSTALLDIR property. Its current value is 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API'. Its new value: 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API\Images\Test'.

 I do not understand what is making the system modify the value, or how to stop it.    I have found that its predictable though, so I have been able to work around it by copying the files back to the right place in script. 

The project is an old one and has been upgraded through several different versions of IS.  When I inherited it, it was missing a number of files that I had to create removefile entries for, and there was a lot of redundant script, so it was a bit of a mess with lots of errors.    This is the only thing that I have not been able to fix.

 

0 Kudos

Hi @emmanuelc ,

 

Looks like on upgrade scenario,during CostFinalize action few properties like(INSTALLDIR,IISROOTFOLDER,SystemFolder) are getting added and modified.

MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API'.
MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Modifying IISROOTFOLDER property. Its current value is 'C:\inetpub\wwwroot\'. Its new value: 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API'.
MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Modifying SystemFolder property. Its current value is 'C:\Windows\SysWOW64\'. Its new value: 'C:\Windows\SysWOW64'.

..

MSI (c) (B4:B8) [19:17:46:190]: PROPERTY CHANGE: Modifying INSTALLDIR property. Its current value is 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API'. Its new value: 'C:\Program Files (x86)\Knowledgeone Corporation\RecFind 6\Web Client and Mini-API\Images\Test'.

 

Can you check any custom action which does this only on upgrade scenarios?It isn't possible for INSTALLDIR change unless until some custom code does.

 

Thanks,

Jenifer

0 Kudos