subs
subs

Reputation: 2249

WIX: Saving user input in xml file

I want to show a custom dialog which will have two text box.After the user types these information(and clicks next) , I want to save the data in an xml file.

How can i do that?

Upvotes: 4

Views: 1848

Answers (1)

Elmar de Koning
Elmar de Koning

Reputation: 519

You have two options:

  1. create a deferred custom action that creates the file and adds all the user data. This is really easy if you can use managed custom actions (DTF). Note that you will have to delete the file you created during uninstall and rollback scenarios!
  2. Deploy an xml file with dummy data during the installation and use the XmlFile / XmlConfig elements to replace the dummy data with the user data using an XPath query. The xml file will be managed by the install process, so no worrying about uninstall and rollbacks.

For a good Wix tutorial see http://www.tramontana.co.hu/wix/index.php

If you need more information about either option, just let me know.

Upvotes: 4

Related Questions