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

not able to remove a key file on applying patch

Hi Team,
I am facing following issue and would need your help. 
 
I have a component(Designer_EN_Macro) in install shield which has four files say A,B,C,D 
I want to delete three of them ,say A,B and C. I removed all the three files from component.
When I install the installer, I see that  file A and B are removed  but not C. 
On investigating, I found that file C is marked as the key file of the component and the Shared setting of the component is set as "YES". So I changed the setting to "NO" and changed the key file to D(which we do not intent to delete)
I then created the installer and was still able to see the file C not removed on installation. 
I then  cleared the key file status and created installer. I was able to remove the file C on applying complete installer package but not when applying patch.
Can we not change the key file or delete the key file from a component in patch?
If thats the case, should I replace File C with some blank file. File C is not a dll or exe. So version should not be issue.
Attaching the screenshot here.
File C is AccessibikityChecker.swf
Component: Designer_EN_Macros
image.png
 
Labels (1)
0 Kudos

(4) Replies
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

A Patch is another way to deliver to a Minor Upgrade - and as such has the same limitations.

It will not support the removal\change of a key file of a component: https://docs.revenera.com/installshield26helplib/helplibrary/MajorMinorSmall.htm

I would suggest that you perform a Major Upgrade to change\remove this file.

hope this helps.

0 Kudos

Can we delete the file using some post installation command.

0 Kudos

No. But as a workaround (especially if it's a large file) you could replace it with a small/empty dummy file of the same name in your update.

Stefan Krueger
InstallSite.org / InstallSite.de
0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

The issue here is that you would be breaking Windows Installer upgrade rules and best practices.
When you move into this territory there is no official documentation about what will happen or how to handle the behaviour as its not support by Microsoft.

"....a small update or minor upgrade must never change the name of a component's key file because this would require changing the component code."
https://docs.microsoft.com/en-us/windows/win32/msi/changing-the-product-code

Creating a custom action that manually removes the file at the end of the install, could create unexpected and unwanted behaviour if a repair, modify or a further upgrade is performed such as the file being reinstalled, orphaned or even issues from seemingly unconnected components.

It's best to stick to the official rules.

0 Kudos