Reputation: 257
I want to write a custom action that will delete an installed file before installation is finalized, i.e after I install file "test" from msi.
I am executing it. Now I want to delete this file after it is executed. I have written a custom action for execution of "test" file. How should I write a custom action for deleting it?
Upvotes: 2
Views: 2337
Reputation: 21426
This is not recommended because Windows Installer may detect the missing file and try to repair it. Instead, you can try this approach:
To extract the file you can use the Windows Installer API. You also need a DLL or VBScript custom action which receives the installation handle. Perhaps this tutorial will help: http://www.codeproject.com/KB/install/msicustomaction.aspx
Upvotes: 1
Reputation: 592
You can use C# for custom action development. Set according Walkthrough in MSDN
Upvotes: 1