- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Not to remove file during upgrade
- 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
Hi ,
i have one situation which needed help.
- I have one msi (let's say platform.msi) which deploy abc.dll in [INSTALLDIR]\bin\
- I have another msi (let's say service.msi) which deploy the same file abc.dll in the same directory [INSTALLDIR]\bin\. Here [INSTALLDIR] is same path for both platform.msi & service.msi
- the installation sequence is platform.msi gets installed first then service.msi
- I cannot chance anything in platform.msi & service.msi now. Since it has be released already.
- Let's consider both MSI got installed on the machine. i.e. the same file abc.dll gets deployed by platform.msi and overwritten by service.msi which is expected.
- Now, if i go for major upgrade of platform.msi then it deletes abc.dll and deploys the new version of that file.
- Important thing is, I have removed abc.dll from service.msi (in order to avoid duplicate between platform.msi & service.msi)
- now, if i go for major upgrade of service.msi, then it delete abc.dll since it has been remove from step6.
and I cannot change the installation sequence, i.e platform.msi gets installed first then service.msi.
My question is, Is there any flag in installshield which will stop deleting abc.dll during major/minor upgrade? or any other solution/configuration available for this situation.
Kindly help. Thank you. It is a bit urgent.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @SSigamani91 ,
Replying to your queries:
"But I also see some of other files are not upgrading properly"-
Since the suggested solution strictly bound with file-versioning rules as mentioned in previous reply:
"If the file versions of the binary files have not changed then they will not be replaced. This type of upgrade also requires that you follow component rules:
http://robmensching.com/blog/posts/2003/10/18/component-rules-101/
https://docs.microsoft.com/en-us/windows/desktop/msi/what-happens-if-the-component-rules-are-broken
"
- Answer:You might need to consider component rules for files to upgrade properly.Say if you have non-versioned files,you can add those entries to RemoveFile table which will remove existing entries and install/override with required files.
"there are some of older version files left over"-
- Answer:Even for those files you can use RemoveFile table which will remove files (If the intention is to only remove)
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @SSigamani91 ,
Did you try with below component setting from platform.msi's abc.dll(Component property):
- Set a Component’s Permanent and Never Overwrite properties to Yes. When you do this, the files in the component will not be overwritten or removed under any scenario
By doing you can avoid service.msi deleting this file.Can you give a try?
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @Jenifer
thank you for the quick reply.
we don't want to change anything in platform.msi. since it got freeze.
Any possibility to fix it up in service.msi during major upgrade not to remove/cleanup this file?. or any other solution do you see?.
Point to be consideration: The files are picked by using dynamic linking, there were no static linking for each components.
Kindly let me know. Thank you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @SSigamani91 ,
How about doing below mentioned steps:
- Try not to remove specific file from service.msi's ism file
- First try to validate the behavior without removing file and major upgrade of service.msi on top of major upgraded one with service.msi
- The expectation is whether it gives respect to file-versioned rule on major upgrade or not.
If that doesn't work:
-
It seems that you need your MajorUpgrade Schedule to be afterInstallExecute. This installs the new product files over the older files, using file version overwrite rules. If the file versions of the binary files have not changed then they will not be replaced. This type of upgrader also requires that you follow component rules:
http://robmensching.com/blog/posts/2003/10/18/component-rules-101/
https://docs.microsoft.com/en-us/windows/desktop/msi/what-happens-if-the-component-rules-are-broken
Note that you need to have the file not to be removed as versioned file.
Best practice( in future may be it is helpful):
One File Per Component: Make sure you use a single component per file you install. I do this for all file types, but you have to for binaries (dlls and exes). This is to make the installer operate correctly and be in accordance with MSI component rules (mentioned by Phil). I see you have a component EXE files and one for DLL files. Make new components for each binary you add to your setup, and set the binary as key path for the component.
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @Jenifer
thank you so much for the information.
I will look into deeply and will try the proposed solution. I will let you know the results.
"It seems that you need your MajorUpgrade Schedule to be afterInstallExecute" : May i know how i can reschedule MajorUpgrade after InstallExecute via Installshield. This might help. Do i need to move any ExecuteSequence to after InstallExecute. May i know which Sequence.?.
Have a good day. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @SSigamani91 ,
You can schedule RemoveExistingProducts after InstallFinalize in your service.msi's ism using Custom Actions ans Sequences view :
- Custom Actions & Sequences->Install ->Execution->Move up Install Finalize (So that RemoveExistingProducts will come after that)
So that the install of the new version's files precedes the removal of obsolete files. In this scenario files are only replaced if they are versioned and newer than installed files, and for unversioned files like txt, pdf, etc... the file replacement rules basically states that the file will only be overwritten if it has not been changed on disk.
Please note:You need not to remove abc.dll here since based on version file removal won't happen
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @Jenifer
thank you for the response.
I will try it and let you know the results.
Have a nice day.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @Jenifer
I tried the solution proposed by you. It worked. thank you for that.
But I also see some of other files are not upgrading properly; there are some of older version files left over. Again this making my another concern.
Regrads
Sathis
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @SSigamani91 ,
Replying to your queries:
"But I also see some of other files are not upgrading properly"-
Since the suggested solution strictly bound with file-versioning rules as mentioned in previous reply:
"If the file versions of the binary files have not changed then they will not be replaced. This type of upgrade also requires that you follow component rules:
http://robmensching.com/blog/posts/2003/10/18/component-rules-101/
https://docs.microsoft.com/en-us/windows/desktop/msi/what-happens-if-the-component-rules-are-broken
"
- Answer:You might need to consider component rules for files to upgrade properly.Say if you have non-versioned files,you can add those entries to RemoveFile table which will remove existing entries and install/override with required files.
"there are some of older version files left over"-
- Answer:Even for those files you can use RemoveFile table which will remove files (If the intention is to only remove)
Thanks,
Jenifer
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)