View Full Version : How do I delete files during uninstall that were not part of the install?

01-24-2008, 11:08 PM
I have an application that creates files while it is in use and would like to be able to delete those during uninstallation. My previous experience is with InstallShield Developer 8.0 where I would configure the RemoveFile table accordingly. Is there a way to do something similar in InstallShield 2008 Express or would I have to write a custom action (most likely DLL) that would "know" where to look for these files and delete them?

01-25-2008, 06:03 AM
U can call a batch file for deleting the files.
or i suoopse the RemoveFile function shoould also work and u can call it in the on MainUIAfter.

01-25-2008, 10:41 PM
Sorry, I should have been more specific. I'm authoring a Basic MSI installation, which means that it is table rather than event driven. Thus, none of the InstallScript OnXXX events/functions exist.

Actually, as far as I can tell, InstallShield 2008 Express does NOT support InstallScript or InstallScript MSI projects so this wouldn't be an option anyway. Is this correct, or am I missing something?

As far as I can tell there is no way to access the RemoveFile table from within InstallShield 2008 Express. Can anybody verify or refute this? Thus, the only option I see is that I would have to author a Custom Action that would be called during uninstallation to delete the files created during program execution (since as far as I know MSI only removes empty folders so without this an uninstallation would leave behind a somewhat less than clean system).

01-28-2008, 01:33 PM
Create the MSI file as you normally would, then edit it with Orca. You can download that free here:


You can then directly edit your RemoveFile table and run your MSI as you wish.

Don't be afraid - Orca is typically used in tandem with Visual Studio when creating an installer without InstallShield. I've found it very useful in these situations, and also for debugging when IS verbose logging just isn't enough.

Also, if you're compiling to a single setup.exe (as it is in my case), Orca works too:

1) Simply run the installation (if it's not already installed)

2) Find the temporary location for that installation (usually C:\Windows\Downloaded Installations). The MSI file will be in there.

2a) You can also look in your registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to find your program's registered GUID

3) Edit the MSI with Orca, and make whatever changes necessary to your RemoveFile table and Save

4) Run the MSI file how you wish (repair, remove, etc)

Hope this helps

01-28-2008, 07:31 PM
Thanks for the reply. I am familiar with Orca but it wouldn't really help me in this case. I should explain that I'm evaluating InstallShield 2008 Express to see if we can use it for some of the products we are developing. Your suggested solution would work for us in the office but not for our end users on PCs around the country. Also, by using Orca to change the MSI file after InstallShield has done a build it means that I cannot have InstallShield digitally sign it and would have to do that as an extra step after modifying the MSI file.

In short, I'm not trying to find a way in which I can solve my problem but a way in which I can solve my problem using InstallShield 2008 Express.

Thanks again for taking the trouble to suggest a solution.

01-29-2008, 03:41 PM
I see...using IS2008EX, I'm not sure. If there's no way to directly edit the tables, then it sounds like you're S-O-L.

However, is it then possible, to build your app with IS 2008 EX so that it generates the MSI file (CD-ROM I think? network image?), edit it with Orca as discussed above, save it, then re-open the project in IS 2008 EX? This may help your problem in two ways:

1) Circumvent 2008EX's apparent shortcoming (or disabled feature)

2) Look for any changes in IS2008EX after changing the MSI that would show the changes