Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Major upgrade all files are not copied


Best Answer deramor , 18 July 2018 - 16:17

Always overwrite sets the file version manually for the key file in the component.  This is not a good thing to do IMHO. 

 

Refer to the File Version rules on Microsoft's website: https://docs.microso...ersioning-rules

 

The best way to handle this is to not revert your file versions and to completely remove the old release from the machine before installing the new one.

However only doing the latter will have the results you want.  The former is just good development practice.

 

Installers have a step called "Costing". https://docs.microso...si/file-costing

These steps attempt to make the installer very efficient.  Microsoft expects that we all are installing many thousands of files and that takes a long time.  In practice however we are usually not doing that.  Combined with the file version rules, costing steps attempt to see which components can be skipped for installing.  This sometimes results in missing files as they are marked as "do not install" at runtime but then also removed during an upgrade.  (Especially with .Net and the GAC)

 

I have seen this behavior in the past and to get around it, I have manually moved the "RemoveExistingProducts" action to just after 'ValidateProductID".

 

This does 2 things.  It removes the old product before costing happens.  Since there is nothing to compare any files to, all components are marked as "to be installed".

However secondly, if something goes wring with your install process, you have nothing to roll back to. 

 

Personally, I like to not try to guard against the situations that might happen and deal with those that will happen.  Every release has the potential to upgrade from an older release. (and thus leave you with missing files)  Whereas, the installer is authored to the best of your ability not to ever fail.  So on one hand, you've got a situation that will almost always happen and another that may never happen.  I move the action as mentioned above and live with the potential to have nothing left over if there is a failure.

Go to the full post


14 replies to this topic

Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 07 June 2018 - 05:58

Hi,
 
 
I am Madhu working on some installation stuff and I am not so familiar with Install shield.
 
 
In my product after one version change (Say from 12.1.2 to 12.2.XX) I changed the product to say it is a major release
 
 
When I try to upgrade from old to new version - All my components are not copied
 
While upgrading I see old files are deleted and copied new files
 
 
But I cannot see all files.
 
 
If I do clean installation - All files are copied.
 
I Have no clue what is going on
 
Could you please help me with this?
 
 
Thanks
Madhu


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 June 2018 - 11:42

Try installing the new version to a different folder (e.g. with the version number in it) to see if that helps



deramor

deramor
  • Full Members
  • 187 posts

Posted 07 June 2018 - 16:01

First, welcome to the world of installers and this forum.  I find it a very helpful place to ask and answer questions. 

 

I suspect this is the wrong sub-forum to ask your question. Are you using a suite project?  The description you provide sounds a lot like upgrade behavior I have seen in the past with Basic MSI projects.  Please confirm the project type you are using.  You can see the project type in the title bar of the Installshield Developer UI when you open the project file.



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 07 June 2018 - 18:23

HI deramor

 

Thank you for the response

 

Sorry for posting it in wrong place.

 

I am using Install Script MSI project.



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 07 June 2018 - 18:26

Hi Stefan Krueger

 

Thank you for the response.

 

I will try that option. But In out product we usually don't change the installation dir while upgrading.

 

Do you have any idea what can we do to resolve this with same InstallDir ?

 

Regards

Madhu



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 08 June 2018 - 05:50

One more thing is

It actually does the uninstallation before installation - I mean it clears everything before copying new one.

 

Strange thing is some of the files which are not added recently (for new release) are also not copied.

 

Ex: a.dll, b.dll -> already exists in old version (12.1.2)

new dlls -> c.dll, d.dll -> newly added for new version (12.2.0)

 

After upgrading from 12.1.2 to 12.2.0 -> I am missing some of dlls from old version say a.dll also some new dlls say c.dll

i.e I can see b.dll and d.dll after upgrade not others

 

Note:

I am using each dll as a single component.

 

Please let me know if you need any information.

 

Thanks

Madhu



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 June 2018 - 11:06

I have moved the discussion to the correct forum. Thank you deramor for pointing this out.

 

Madhu Sameena that sounds weird. Maybe a log will give you some hint. Note however that I don't recommend "InstallScript MSI" in general and especially there have been known problems with Major Upgrades in the past with that project type. This advice is probably too late, but if feasible please switch to Basic MSI. 



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 11 June 2018 - 11:12

Hi Stefan,

 

Thank you for the response.

 

I will try to analyse the log.

 

We are using the "InstallScript MSI" because we use some custom scripts while installation.

Is there any way we can use this "Basic MSI"

 

Regards

Madhu



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 June 2018 - 09:34

In Basic MSI you can call Install InstallScript functions as Custom Actions.



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 18 June 2018 - 09:05

When I try to analyse the log file
One of the difference what I see now is
Action: Null - for the missing components - For other components it is Action: Local

 

On Clean installation - I can see Action: Local - for all components.

 

Any clue about this ?



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 18 July 2018 - 14:03

I found that It happen because of version changes (some issue with Git Tag) 
I.e. some components are lower versions in latest build (Not copying the files because latest version has lower version)

 

I tried Always Overwrite option for the corresponding files - It worked.

Is there any other way to solve this issue?

 

I tried to set REINSTALL to ALL and REINSTALLMODE to vemus in "Property Manager " - looks like it it is working - need some more testing

 

Could you please let me know Is it ok use those properties there ?

 

Thanks

Madhu 



deramor

deramor
  • Full Members
  • 187 posts

Posted 18 July 2018 - 16:17   Best Answer

Always overwrite sets the file version manually for the key file in the component.  This is not a good thing to do IMHO. 

 

Refer to the File Version rules on Microsoft's website: https://docs.microso...ersioning-rules

 

The best way to handle this is to not revert your file versions and to completely remove the old release from the machine before installing the new one.

However only doing the latter will have the results you want.  The former is just good development practice.

 

Installers have a step called "Costing". https://docs.microso...si/file-costing

These steps attempt to make the installer very efficient.  Microsoft expects that we all are installing many thousands of files and that takes a long time.  In practice however we are usually not doing that.  Combined with the file version rules, costing steps attempt to see which components can be skipped for installing.  This sometimes results in missing files as they are marked as "do not install" at runtime but then also removed during an upgrade.  (Especially with .Net and the GAC)

 

I have seen this behavior in the past and to get around it, I have manually moved the "RemoveExistingProducts" action to just after 'ValidateProductID".

 

This does 2 things.  It removes the old product before costing happens.  Since there is nothing to compare any files to, all components are marked as "to be installed".

However secondly, if something goes wring with your install process, you have nothing to roll back to. 

 

Personally, I like to not try to guard against the situations that might happen and deal with those that will happen.  Every release has the potential to upgrade from an older release. (and thus leave you with missing files)  Whereas, the installer is authored to the best of your ability not to ever fail.  So on one hand, you've got a situation that will almost always happen and another that may never happen.  I move the action as mentioned above and live with the potential to have nothing left over if there is a failure.



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 19 July 2018 - 10:57

Thank you for your detailed explanation.

 

It helped me to solve one issue

 

I have one more issue with another setup

 

When I am doing major upgrade -> I see only some new files and rest are old version files.

 

i.e. It is not removing the old version files.

 

Any clue what I am missing ?



deramor

deramor
  • Full Members
  • 187 posts

Posted 24 July 2018 - 16:35

They may be orphaned or considered shared.  Take a look at a log when you perform the upgrade and search for the file names or component names. 

 

Also try to run the test in a clean environment if you haven't done so already.



Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 24 July 2018 - 18:22

Hi

 

I tested on clean environment - I don't see any issue with it.

And When I see log ->  Action: Null - for the missing components - For other components it is Action: Local

 

As far as I know we don't have any shared components

 

BTW we are using different release types (Don't know whether this relates to issue or not)