Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstall leaves files behind


3 replies to this topic

GrantCermak

GrantCermak
  • Members
  • 4 posts

Posted 06 September 2005 - 14:27

Our software product makes use of several merge modules. After uninstalling many of the files included in those merge modules are left in the directory INSTALLDIR.

I examined the install msi file table and the attributes field is set to either 16385 (100000000000001) or 16896 (100001000000000).

I examined the install msi component table and the attributes field is mostly set to 0 (one file is set to 8, one to 24).

It seems to me that none of these files are marked "permanent" so I cannot understand why these files would not be removed on uninstall.

Can anyone lend some assistance?

I have included a verbose log of the uninstall with this post for further information. (Included in two parts as a zipped file due to file attachment size limits)

Thanks,

Grant

Attached Files



GrantCermak

GrantCermak
  • Members
  • 4 posts

Posted 06 September 2005 - 14:27

Here's part 2 of the verbose log from the previous post.

Attached Files



GrantCermak

GrantCermak
  • Members
  • 4 posts

Posted 06 September 2005 - 20:57

I have a thought about why this might be happening:

I found this FAQ on a Microsoft site:

http://www.microsoft...nt/msi_faq.mspx

Q. Why are my files not being removed during uninstallation?

A. There are four common reasons for why files may not be removed during uninstallation:

• The components to which these files belong are marked as permanent. (This is done through the Attributes column of the Component table.)

• None of the components to which these files belong have component GUIDs. (The value for the component in the ComponentId column of the Component table is NULL). Components without GUIDs are not managed by Windows Installer.

• If the keypath of the component has a shared DLL refcount, then the component will not be uninstalled.

• If the component is installed in the system folder and at the time of uninstallation there is an external shared DLL refcount for any one file in the component, then the component will not be uninstalled.

I think I might be having trouble with the "keypath of the component has a shared DLL refcount, then the component will not be uninstalled." Because I think multiple Merge Modules are installing the same file.

How can I determine if this is the case?

Grant

mandy

mandy
  • Members
  • 121 posts

Posted 07 September 2005 - 09:17

For a "per-machine" install (ALLUSERS=1), search for the name of your keypath file under the following registry key:

"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\"

This is one of the locations where Windows Installer tracks resources.

If the merge-module version of the component has always been used to install that resource, you should only find your keypath file path under a single GUID subkey. The GUID subkey corresponds to the component code although this may not be obvious at first. The GUID(s) on the right correspond to the product code(s) although this is not obvious either. If there are several product codes on the right (with a keypath) then the component has been installed several times. A product code of "00000000000000000000000000000000" means that the component is "permanent".

Also search under the following registry key:

"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs\"

This part of the registry corresponds to the Shared DLL count.

If the count is more than one, the file will not be removed when you uninstall your MSI. Bear in mind that if the file already exists when the shared DLL count is first initiated, the count will immediately be set to 2. This is because the new application is using it AND "something" else must have been using it previously because it existed.

Does this make sense?? blink.gif

QUOTE
I examined the install msi component table and the attributes field is mostly set to 0 (one file is set to 8, one to 24).


8 = msidbComponentAttributesSharedDllRefCount
24 = msidbComponentAttributesSharedDllRefCount + msidbComponentAttributesPermanent

It seems that one of your components is permanent, and another is setting the shared dll count?

Edited by mandy, 07 September 2005 - 09:22.