0

I new to WIX. I have an requirement to run a batch file using MSI installer. I have done the below steps.

  1. Call the batch from a C# sharp code and converted it into dll.
  2. I used WIX_Mondo and called the dll using custom action. Its working fine with some unwanted scenario.
  3. But I need just one dialog with a single button. Just click on the button - to call the dll and run batch.

Please help me. Thanks.

Mohamed
  • 11
  • 1

2 Answers2

0

If your question is on how to call a custom action after clicking a button take a look at this article:

WIX CUSTOM ACTION CALL AFTER NEXT

Community
  • 1
  • 1
Cole W
  • 15,123
  • 6
  • 51
  • 85
  • Thanks Cole. But the fact is i have no idea where exactly i have to write the code. Like between product tag or between UI tag. Kindly help me by providing a full code. It will be really useful for me. Thanks – Mohamed Mar 27 '14 at 08:31
  • You don't write any code in the WiX. You write (for example) C++ code in a custom action Dll, and call it as custom action with the DoAction published event on the Next button. – PhilDW Mar 28 '14 at 16:57
0

welcome to the community - it seems this is your first question. We need more information to figure out if there is a better way to do what you ask.

Can you briefly explain what the batch file is doing? Very often the batch file operations can be converted to WIX / MSI constructs that greatly simplify and enhance the operation of your setup.

Just adding the batch file to run via a button in your setup dialogs means that the action will be skipped entirely if and when the setup is run in silent mode. This is a much more important setup feature than you may think, since it is how large companies install their software.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks for warm welcome. My batch file install model file (Dynamics AX) from the VS project folder to SQL Dynamics AX Model DB. – Mohamed Mar 27 '14 at 08:32
  • I have never done this particular task, can you provide a few sample lines from the batch file? Just so we see what binaries are involved. – Stein Åsmul Mar 27 '14 at 18:05