This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Removing files after installation
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 29, 2009
06:32 PM
Removing files after installation
My installer installs some other files other than my actual files of the installation. At build time, InstallShield finds some dependencies and includes those files along with my actual files. I want to remove those files from the installation as they will definitely exist on some other location on the target machines.
Also there is a 3rd party exe that use to do some configuration on the target machine. I first copy that to the installdir and call it in a Custom Action.
I want to remove those files after installation. What is the best practice for that in InstallShield? Or do I have to write a Custom Action for this?
Thanks in advance.
Also there is a 3rd party exe that use to do some configuration on the target machine. I first copy that to the installdir and call it in a Custom Action.
I want to remove those files after installation. What is the best practice for that in InstallShield? Or do I have to write a Custom Action for this?
Thanks in advance.
7 Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 29, 2009
06:33 PM
Adding records to the RemoveFile table (exposed in the Direct Editor view) is one common approach. The MSI help has information about what goes in that table.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
09:11 AM
Robert, this is not doing what I want I am afraid. Documentation says RemoveFile Table is taken into account by RemoveFiles action which is called before InstallFiles; so the file that I want to remove is not at the file system yet. I want to remove a file that I installed, making sense?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
09:18 AM
If you are using InstallScript, you can write a function to delete files post installation manually. For example:
Create a custom action, assign the above function to it and schedule it to execute in Deferred mode after InstallFiles or wherever you want to.
This will help you. I make use of this in my installation quite a time to delete files that get created at runtime of the software but I execute this during uninstallation so I add condition for Custom Action to execute during Removal. You can put condition during Installation or Removal as required.
function CA_DeleteFiles(hMSI)
begin
DeleteFile("path of the file" ^ "filename");
end;
Create a custom action, assign the above function to it and schedule it to execute in Deferred mode after InstallFiles or wherever you want to.
This will help you. I make use of this in my installation quite a time to delete files that get created at runtime of the software but I execute this during uninstallation so I add condition for Custom Action to execute during Removal. You can put condition during Installation or Removal as required.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
09:25 AM
Thanks! I am not using InstallScript but looks like I will have to do something similiar to yours in a C++ dll unless I get a solution within InstallShield IDE.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
12:25 PM
If you don't need to worry about dependencies, an action that uses the Binary table for storage might do the trick...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
03:31 PM
Also, you can use an InstallScript custom action to supplement your Basic MSI project. That way you can still do the coding (without a C++ DLL) AND use an MSI based project. It's hot stuff.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 11, 2009
06:53 AM
RobertDickau wrote:
If you don't need to worry about dependencies, an action that uses the Binary table for storage might do the trick...
Robert, could you elaborate on this please? What exactly do you mean by "an action that uses the Binary table"?
