shared dll not removed issue - probable reasoning

Got a problem you cannot solve? Try here.
Post Reply
alexius.luke
Posts: 11
Joined: Thu Aug 25, 2011 10:29 am

shared dll not removed issue - probable reasoning

Post by alexius.luke »

We have "TestApp1" placing "appfile.ext" in "c:\apptestdirectory\"
We have "TestApp2" placing "appfile.ext" in "c:\apptestdirectory\" which is marked in InstallAware as a shared dll.


Install both
1. When installing "TestApp1" there is an entry for "appfile.ext" in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\9B6C1D671E5DDBE459DFCBF23C3BB9F2.(Searched for "appfile.ext" and found this).

2. When installing "TestApp2" there is an entry for "appfile.ext" similar to the one above. But in addition since the file is marked shared dll, there is an entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\ for "appfile.ext" with a value which is equal to the number of installations of that file. And it seems like the Installer searches the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ root for the number of installations of that file and writes the appropriate number. For this case it is 2.

Uninstall both
3. When uninstalling "TestApp1" it does not go to update the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\, "appfile.ext" key for the number of installations. Sounds correct, as it has not marked the file as shared. And also it correctly removes the entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\ that it placed while installing.

4. When uninstalling "TestApp2" the entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\ for the file has value 2. And while uninstalling it seems like the Installer does not search the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\ root for the number of installations of that file and writes the appropriate number. It just decrements it by 1 for the uninstallation it is doing for its own. So as the remaining value is 1, it does not remove the shared dll, even though the dll is not shared by any installed software anymore.

Is it a missed out implementation that is/can be corrected in future releases?
If not, can anyone explain this behavior or point me to a work around?


-Alex
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: shared dll not removed issue - probable reasoning

Post by giaviv »

Alex,

Could you please try this with an actual valid dll instead of a text file? Thanks!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
alexius.luke
Posts: 11
Joined: Thu Aug 25, 2011 10:29 am

Re: shared dll not removed issue - probable reasoning

Post by alexius.luke »

Aviv,

It shows the exact same behavior with actual valid dll also.

Please note that,
"TestApp1" InstallAware project, includes the dll as a file and not a shared dll.
"TestApp2" InstallAware project, includes the dll as a shared dll.
Same holds good for the "appfile.ext" file that I mentioned in the first post in this thread.

-Alex
alexius.luke
Posts: 11
Joined: Thu Aug 25, 2011 10:29 am

Re: shared dll not removed issue - probable reasoning

Post by alexius.luke »

Hi,

One new observation. In my first post in the thread, and point 2 under "Install both", I had mentioned about how it seems like installer searches for the installed keys under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ for the file and puts in the appropriate number in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\ entry.

But I found out that the logic seems like the installer just checks if the file exist and then put 2 in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\ entry. This is because even if I remove the entry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ put by the first installer, the second installer seems to put 2 as the value in the SharedDlls entry. But if I delete the file in the file system, it puts only 1. Hence I think this logic.

But if the installer is using the registry to find out the file installation and then put the appropriate number, then it will be better to control this behavior.

-Alex
Post Reply