
tyler.badorrek1.5524936873975205E12 asked a question.
Problem with MoveFiles table - help!
In my Basic MSI project, I'm including in Support Files a zip filed containing all the resources that need to be installed (easier to maintain things this way). One of the first things I need to do is unzip the resources.zip file into the SUPPORTDIR. I do this successfully right after InstallInitialize by calling a custom action.
Now the problem I'm having is that there are files I want to move from the unzipped archive over to the install destination. In the MoveFiles table I've added entries for a couple of config text files that simply need to be copied from SUPPORTDIR. This works fine if I add the files directly in Support Files (or if I unzip the archive at the beginning of the User Interface phase), but they don't get copied over when I unzip the archive after InstallInitialize in the Execute phase, even though the MoveFiles action doesn't happen until later.
Do the source files specified in the MoveFiles table need to be present before the Execute phase in order to get moved correctly? I'm having some difficulty figuring out how to best solve this.
I suggest you create a MSI log file and attach it here with a clear indication of the name of your custom action responsible for unzipping the contents in the SupportFiles view and the contents of your MoveFile table. It may become clearer what the problem is.
-Ajay
However, the issue I had with that is the SUPPORTDIR does not get deleted automatically, since I altered its contents with a custom action. So I made a custom action to delete SUPPORTDIR at the end of the installation. What I'm worried about is during rollback, or other times when that delete SUPPORTDIR action may not get executed, and the directory is left on the target system.
Do you know of a safe way for me to make the extraction an immediate custom action and ensure SUPPORTDIR will always get deleted?
Since your custom action is already extracting files from a zip file, you could just extend the custom action itself to copy the files to the appropriate destination folder instead of relying on MoveFiles. If the files need to be copied to some directory created by the MSI, you can resequence your action after InstallFiles (again as a deferred action). You can then use a rollback action to remove any files that were copied if an error occurs.