PDA

View Full Version : How to delete files not originally installed.



bigmike_f
12-08-2004, 11:06 AM
Our product uses jython and generates a cahce directory during execution. Since Installshield is unaware of these files, they are not deleted during the uninstallation.

What I've tried so far...

- scripts that have deleted the cahce directory, but then Installshield does not delete the original set of installed files.
- added the cahce files to the initial Installshield set of files, but the cache directory is recreated for reasons specific to jython.

Are there any suggestions? I really want to have a clean uninstallation.

TsungH
12-08-2004, 11:11 AM
You can author entries in RemoveFile table to remove files/folders not installed by your installation.

bigmike_f
12-08-2004, 11:24 AM
This is like 8,000 times better then support calls. Thank you so much for the quick response. I'll let you know if this solves my problem.

Christopher Painter
12-08-2004, 12:17 PM
It is nice that InstallShield staff make themselves available for answers, but lets not forget the real purpose of "community". For developers to help each other. I challenge everyone to learn the tool and contribute back. Personally I have learned alot by looking at the "hard" questions asked by developers here, figuring them out and then answering the question. I really do it for myself more then for the person asking the question.

bigmike_f
12-08-2004, 12:36 PM
Yes this worked, granted it was quite troublsome having to delete each individual directory by hand. (A tree deletion option would be nice.)

I've found that communities are really adventagious to the adoption of a technolgy. Personally I enjoy reading java.net for many technequies in the java field. Has help me in my job, and increased my speed at creating solutions.

Christopher Painter
12-08-2004, 12:41 PM
That is a limitation of the way MS designed RemoveFiles. If you want to delete a tree you can create a custom action. The CA could manifest itself in a variety of ways such as a vbscript creating a filesystem object.

Christopher Painter
12-14-2004, 11:40 AM
That is true, but the poster asked for a tree delete. Wildcarding will only delete the files in the specified directory and the directory itself provided that it is empty and the mask is set to NULL. But it won't delete recursively.

ashishs
09-28-2005, 06:31 AM
Hi bigmike f,

I am facing the same problem that is My Application generate file while Launching, Now when I uninstall this Application from Add/Remove panel, it does not uninstall only those files that are created by my Application.

So how you have done enteries in Removefile Table means what to specify following columns "File Key,Component,FileName, DirProperty" as these files conatin no Component

I have created vbscript to remove these files but it still it is not removing these files. My vbscript code is given
Function DeleteFiles( )
Dim fso, DeleteMapFiles, DeleteMap
DeleteMapFiles = "D:\Proj\bin\Map\AddressType.map"
DeleteMap = "D:\Proj\bin\Map"
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile(DeleteMapFiles)
'MsgBox = "Remove map files."
fso.DeleteFolder(DeleteMap)
End Function

I have use this script in CustomAction and called it after Install Execute Sequence and specify "Remove" condition in Install Execute Condition

Thanks


Ashish