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

Shared files are not removes on uninstall

Hallo,

as our applications share a few files I marked them as "shared" in the IS project. According to help this will increase a counter.
I would expect that this counter is decreased on uninstallation and the file is removed when the counter is 0.
Just that it doesn't. Even if only one application is installed the shared files remain after uninstallation.

What am I missing?

Thanks
Rita
Labels (1)
0 Kudos
(6) Replies
RobertDickau
Flexera Alumni

What type of project (MSI or InstallScript) are you using?
0 Kudos
Ineluki
Level 3

It's a pure InstallScript project.
0 Kudos
arrojusrikanth
Level 3

write a custom action to delete shared files while uninstallation.
0 Kudos
Ineluki
Level 3

No kidding? IS doesn't handle this itself? *sigh*

Just to simplify things for me - could you tell me please how I can check this counter in order to delete the files manually if they are no longer used by any of my apps?

Thanks a lot.
Regards
Rita
0 Kudos
RobertDickau
Flexera Alumni

Yes, the shared file count should be adjusted on both installation and uninstallation; I think there's special handling if files already exist, even if they don't have reference counts, that InstallShield plays it safe and sets the the count to 2, to ensure the files aren't removed while some other app still needs them.

If you do need to check a file's count, you can call GetFileInfo with FILE_SHARED_COUNT.
0 Kudos
Ineluki
Level 3

RobertDickau wrote:
Yes, the shared file count should be adjusted on both installation and uninstallation; I think there's special handling if files already exist, even if they don't have reference counts, that InstallShield plays it safe and sets the the count to 2, to ensure the files aren't removed while some other app still needs them.


Sounds as if I could forget about shared files completetely, just install all files as non-shared and hope that if a user really should install two of our apps into one folder and the uninstalls only one that it still works.

I don't see any reason why there is such a component option in InstallShield when I still have to deal with it all by myself. :confused:
And as I don't see the reason behind it, I'll probably end up screwing it all up when trying to handle it correctly. Not to mention wasting time with setup programming instead of dealing with my software project. :mad:

But thanks for your reply!

Regards
Rita
0 Kudos