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

installtion directory not removed after uninstallatio

hi,

I did a minor upgrade for my setup and after upgrading it I tested uninstallation, during uninstallation all the files are removed but the folders still remain. But when I install it seperately(i.e not upgrading from old version) it uninstalls properly. Also there is no entry in "sharedDlls" registry entry . What might be the reason? Is there any way to manually delete the install directory.

thanks
arul
Labels (1)
0 Kudos
(3) Replies
Nick_Umanski
Level 7

Folders left behind, no way of answering that question, specific to your installation. You have something holding the folder open when the delete folder action occurs or at least when the folder or files in use test takes place. Are you deleting everything off through components or having to put entries into the RemoveFiles table? Have you renamed components or changed their Guids while still installing the same file or have you moved that file to a new component? Silly question but can you actually see all files in the relevant directory - eg not set the System Files = Hidden.

SharedDll registry entry - is that before or after the uninstall? Assume it is while the product is installed. Are you setting a Key File in each component? Are the Shared flag in the components set to yes?
0 Kudos
arulprakash88
Level 3

Hi Nick Umanski, thanks for the reply.

Are you deleting everything off through components or having to put entries into the RemoveFiles table?

Yes, I am deleting everything by components, and my RemoveFile table has no entry. But during the upgrade I am removing two files(which are in two seperate components), as components can't be deleted in a minor upgrade I am retaining those components and im making their condition to "0" so that they will not be installed during upgrade, which works fine.

Have you renamed components or changed their Guids while still installing the same file or have you moved that file to a new component?

I didn't rename any old component also did'nt change their guids. But I moved a file from a component(X) and created a new component for that file itself . Because the file was changed in upgrade but it was not set as a key so the compiler threw an error saying "the file will not be updated during upgrade". So i had to create a new comp for it.

Silly question but can you actually see all files in the relevant directory - eg not set the System Files = Hidden.

yes,i can see all files

SharedDll registry entry - is that before or after the uninstall? Assume it is while the product is installed. Are you setting a Key File in each component? Are the Shared flag in the components set to yes?

Yes, its while install. also im setting key file for all the components. Actually the newly created component(X) which is mentioned previously was still there after uninstalling along with empty folders. Because it had entry in the shared dll after uninstalling also. So I made the shared option to "No", only for this component. But all the other components are shared.
0 Kudos
Nick_Umanski
Level 7

arulprakash88 wrote:
Yes, its while install. also im setting key file for all the components. Actually the newly created component(X) which is mentioned previously was still there after uninstalling along with empty folders. Because it had entry in the shared dll after uninstalling also. So I made the shared option to "No", only for this component. But all the other components are shared.


The first question that this begs is "Why are you using a minor Upgrade, as opposed to a Major one?" The moment you start trying to shoehorn functionality into a minor upgrade that belongs in a major upgrade you are going to cause problems. How big is your installer? Personally, I've stopped using minor upgrades, too many issues like the one you are describing and they are only really usefull if your installer is huge, I'd say at least 50M and the need to deploy it across a network to loads of machines.

You have contradicted yourself too. First you said the folders were empty, now there is this one file remaining. You said there is no entry in the Shared .dll count, but have you actually looked or are you just assuming this cause you set the shared flag to No? You have misunderstood how the shared flag works:

"...the installer will increment any existing reference count for any file in a component whether or not you mark the component as shared. If no reference count exists, the installer will not create one...when the shared flag is set to No"

Note that the shared .dll count is for the file, not a particular component. So it would seem that your first install will set up a reference count. Your upgrade will do nothing with the original component cause you have conditioned it out. It will then install a new component with the same file and increment the shared .dll count to 2, then when you uninstall, it decrements it back to 1 and leaves the file in place. Because there is a file left behind, the folders remain too.

You could try shoehorning a bit more by deleting off the shared .dll count using the RemoveRegistry table, not a great idea if you don't really know what you are doing. However, frankly I think you have probably got a few more problems with this installer and you really need to start again and do a Major Upgrade, leaving the file in the original component and if necessary setting the major upgrade option of "Completely uninstall old setup before installing new setup"
0 Kudos