Ryan O'Neill wrote:

I've got a Custom Action working as a DLL from my console app and it deletes file on disk. I now want to push the file deletion into the RemoveFiles table. Given that I have a handle to the MSI file instance, how would I access/call the RemoveFile function based on the below? Should I use the WcaInitialize call for logging too? Just some general pointers, I'm not asking for anyone to write my code for me.


Definitely take advantage of the wcautil.lib functions. http://www.joyofsetup.com/2007/07/01/semi-custom-actions/ has a snippet of how to use WcaAddTempRecord to add the temporary rows.

Also, it occurs to me that I might have to push the files into RemoveFiles in reverse order so that the descendent directory/file entries get deleted first. Is this correct or do I not need to bother?


Good question. I suspect it doesn't matter. MSI doesn't guarantee an order anyway. You can let MSI handle the directory deletion by using a null FileName column; you still have to recurse into the subdirectories but you don't need one row per file, just one row per directory.

--
sig://boB
http://joyofsetup.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to