Page 1 of 1
Uninstall not deleting all files?
Posted: Thu Jul 29, 2010 12:01 pm
by EasyPickens
I have an install script that seems to work great, but while testing the uninstall it leaves odd files behind? The uninstall works and clears tougher items like a Windows Service, but for some reason it leaves a couple of items like an XML file, and gif. It is also leaving a bin directory and about 10 DLLs out of 20. The directory left is for a .NET 2.0 WinForms application that hasn't even been run on the machine. No files are used or changed before I try to uninstall. Since the desktop app hasn't been run, I don't think it is an access denied problem. None of the files have the Read Only attribute set.
Since I'm very new to InstallAware, I just need to ask if I'm doing this correctly.
My install script is attached.
I'm using the demo version of InstallAware I downloaded from here on Monday (7/26/2010): InstallAware 9 R2.
Thanks
Re: Uninstall not deleting all files?
Posted: Thu Jul 29, 2010 11:22 pm
by mills
In what directory are these files you want uninstalled appearing in?
Are they coming from one of your Install Files commands (like one of the *.*)?
Re: Uninstall not deleting all files?
Posted: Fri Jul 30, 2010 8:47 am
by EasyPickens
Here is what I am doing on a clean VM machine runing an up to date copy of Win 2003.
1. Run install. The install correctly sets up everything including the Windows Service. It even starts the service, exactly as requested.
2. Run uninstall. It runs with no errors and clears the windows service (even though it was running - exactly as requested).
Then I check the directory to see what is left. Out of an install that contains 4,026 files, 252 folders and is 266 Megs of stuff. I am left with 17 files (16 megs) spread across the following directories.
C:\Program Files\LogiXML ETL\LogiStudio\bin
C:\Program Files\LogiXML ETL\LogiStudio\Lexers\LogisenseImages
C:\Program Files\LogiXML ETL\LogiStudio\NewFile\EtlJob
C:\Program Files\LogiXML ETL\LogiStudio\NewFile\SupportFiles
C:\Program Files\LogiXML ETL\LogiStudio\Rules\LogiEtlEnt\10.0.27
C:\Program Files\LogiXML ETL\LogiStudio\Web\images
The directories are all from the LogiStudio group that uses the *.* to build the list of files to include in the package. If you need to know the exact files, I could send them but I don't feel comfortable listing them here.
PS: I added a Recursively Delete Files command to clear the $TARGETDIR$ in the uninstall section of the MSI Script. That command did clear the directory tree, it left the $TARGETDIR$ but cleared everything else. So I don't believe it is a permissions or 'file-in-use' issue.
Thanks
Re: Uninstall not deleting all files?
Posted: Fri Jul 30, 2010 9:41 am
by bokkie
I can't remember where in the registry you'll find it, but there is a reference count that's maintained for some files. The idea being is that if the count is non-zero, the file won't be deleted. This might apply to assembly files or other DLLs but I'm not sure. I mention this because I too had files that failed to uninstall but that was a long time ago when I used InstallShite, sorry, InstallShield (I think I was right first time!). Once I set the count to 0, the uninstaller correctly nuked the files. The registry might have something like reference count as the name of one of the keys. You might also find the filename itself in the regsitry. Anyway, that's something to think about.
Re: Uninstall not deleting all files?
Posted: Sat Jul 31, 2010 7:38 pm
by mills
I couldn't reproduce this with a simple test of my own using the same folder structure.
I'd be curious if there appears to be any common trend among the persisting files (size, type), but this is something I can investigate on our side if you send your project.
Also, were you able to check out the registry to see if the previous post offered any insight?
From what I can tell from your script, you aren't selecting the "Permanent File" option in your Install Files calls.
I think it would be most helpful to get a copy of your project. Could you send a link to
[email protected]? It sounds like Recursively Delete Files provided a workaround for you, but that perhaps that shouldn't have been necessary. So, if you'd like us to investigate (and I think it would help us if you did in fact discover a bug), please send it over.
Re: Uninstall not deleting all files?
Posted: Tue Aug 03, 2010 2:48 am
by alibaba
The Registry Key bokkie means is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls
I also know this problem in context IS, if you set components as shared the files were not deleted. It was really a shitty behaviour, because the files were installed once but anyway not deleted. If all my setups projects would be already migrated to IA I could forget about all this IShit...
Re: Uninstall not deleting all files?
Posted: Tue Aug 03, 2010 4:34 am
by bokkie
alibaba wrote:The Registry Key...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls
That's the one! It brings back unhappy memories from my InstallShite days.
