ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

unstaller removes files fromnothe installation

Tue Dec 07, 2010 4:45 pm

Dear Sir/Madam,

I use the AI 7.1.3 enterprise.

I have several products and some of them install the same files, e.g.
in C:\Program Files\Comm files\my companyname\myupdater.exe

I install mypackage A that installs this myupdater.exe and mypackage B that installs this myupdater.exe as well.
All is fine.

but when I unistall one of these installed packages, myupdater.exe is removed.
Why? I though there is an automatism such as a counter and only when that counter is 0 the file is removed.
Or do I have to configure AI for that?

The file should not be removed as it is still used by the other package.

Thanks,
Chris

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: unstaller removes files fromnothe installation

Wed Dec 08, 2010 4:54 pm

Hello Chris,

To resolve this you can set the GUID of the updater component to be same in all your projects from the "Organization" page. This way the updater won't be removed when you uninstall one of your applications.
Windows Installer is not otherwise able to recognize one component installed by two packages in the same location if they have the same GUID.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: unstaller removes files fromnothe installation

Thu Dec 09, 2010 12:31 pm

Thanks for your answer,

but...
1. myupdater.exe is a file and not a component, and I do not see how to change the GUID for a file.
And even for a component I do not see a field for the GUID

2. I have all in all 5 projects and up to 20 files, some of then used by all applications some in only a few of them.
How to solve that?


Chris.

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: unstaller removes files fromnothe installation

Fri Dec 10, 2010 1:52 pm

Hello,
myupdater.exe is a file and not a component, and I do not see how to change the GUID for a file. And even for a component I do not see a field for the GUID
Each file is part of a component, thus the "myupdater.exe" file is part of a component as well. Files can be organized into components and components into features from the "Organization" page. For example, here is how the updater component would look like right after adding it from the "Updater" page:
updater.jpg
updater.jpg (24.87KiB)Viewed 5340 times
Also in the right pane notice the GUID field.
I have all in all 5 projects and up to 20 files, some of then used by all applications some in only a few of them.
How to solve that?
You just need to set the same GUID for all your files' components in this case as well.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: unstaller removes files fromnothe installation

Fri Dec 10, 2010 7:58 pm

Thanks for the answer.
Ok, I check only the featres pane, and not the components pane.

Ok, each component has it's GUID.
But I do not understand how AI organizes/creates these components, as the members are somehow mixed.

E.g. component Updater.exe.manifest contains these members:
Deutsch.lng
English.lng
Francais.lng
Updater.exe.manufest
Debug.exe.manifest
...
But these lng files have nothing to do with the updater.exe, (except they aree in the same (destination) folder), so why does AI put them together? And why is e.g. Debug.exe.manifest as well in that component?


"You just need to set the same GUID for all your files' components in this case as well"
"just"?? This seems to be a lot of work, searching in each of the 5 projects each of the 20 components and enter for each file the same GUID. and if a file is in a component name after another file, it is hard to find.
Isn't there an easier and less error prone way.
Or is there at least a possibility to reorganize the components, so that each file is exact one component.


And some of the files are not removed, although they have a different GUID in different projects.
Why is this working for some files and for some not?


Can I create for each file set that is common a new feature, and then somehow import these features to the projects they are in as well.



thanks,
Chris

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: unstaller removes files fromnothe installation

Mon Dec 13, 2010 1:47 pm

Hi Chris,
But I do not understand how AI organizes/creates these components, as the members are somehow mixed.
Advanced Installer generates components based on Microsoft recommendations.
But these lng files have nothing to do with the updater.exe, (except they aree in the same (destination) folder), so why does AI put them together? And why is e.g. Debug.exe.manifest as well in that component?
The ".lng" and ".manifest" extensions do not require separate components, so they are grouped in a single component. The organization is done based on file type and folder location.
"You just need to set the same GUID for all your files' components in this case as well"
"just"?? This seems to be a lot of work, searching in each of the 5 projects each of the 20 components and enter for each file the same GUID. and if a file is in a component name after another file, it is hard to find.
Unfortunately this is how Windows Installer handles shared resources. It's usually best to determine shared resources from the start and configure them appropriately for each new product. If you already have multiple products which are not configured correctly, perhaps it would be better if each product uses it's own set of shared files.

I'm afraid that there isn't a simpler approach for this.
And some of the files are not removed, although they have a different GUID in different projects.
Why is this working for some files and for some not?
Most likely they are not removed for other reasons. To determine the exact cause you can try creating an uninstall log.
Can I create for each file set that is common a new feature, and then somehow import these features to the projects they are in as well.
No, I'm afraid that this is not possible.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”