Is there an easy way to define and use a custom action that handles files in some way (also handling rollback and uninstall correctly)?
Looking at the current mechanism, it's seems complicated and error-prone. Note: I got a friend to ask this same question at stackoverflow <http://tinyurl.com/wixaction>; you don't need to go there to follow this email and I've included some answers, here. If I create such a custom action, I want it to be rolled back correctly. I also want it to uninstall correctly and to have that roll back correctly. I need to give those parameters and I need to schedule everything. In all, that leads to 16 elements in the wxs, for what I perceive to be a single 'action', with a lot of copy and paste and conditions that seem like magical incantations and many seem to get wrong (REMOVE<>"ALL"). In answer, it has been suggested that I write a WiX extension for each such action; I presume that this isn't expected to be a typical use case, though. Also, writing an extension to WiX just for a custom action or two would probably be a little extreme. Another suggestion has been to have an immediate, scheduled action that then schedules the appropriate (otherwise unscheduled) actions, based on context, and also sets their parameters. This leads to (I think) only four to six elements in the wxs, which is an improvement, but also leads to every such action having common code for setting up parameters, working out whether things are being installed or uninstalled and scheduling actions accordingly. It seems to me that the ideal case would be having only one or two elements in the wxs, which would include a CustomAction looking something like this: <CustomAction Id="AnID" Execute="everywhichway" BinaryKey="MyDLL" DllEntryDo="DoThing" DllEntryUndo="UndoThing" Value="[MYPROP]" Return="check"/> Could that be made to work? Is there an easy answer? Are there any plans for providing easy answers in WiX 3 or later? Am I just doing it wrong? I have .NET development experience and may be able to help in implementing the solution. Regards, Grant Husbands. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users