0

i want to create a installer using windows installer i am a beginner i have created a dialogue and a edit box in it.

After installing my files using WIX 3.7 I would like to change some values in one of my config files

over writing the config file during the setup with the given string in the edit box

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139

1 Answers1

0

The value in the edit dialog is associated with a property with an uppercase id (assuming you're referring to a WiX dialog/edit box). You should declare that property as Secure=yes in your WiX so it is public throughout the entire install.

To write the value to a file, you need a deferred custom action, for which this is relevant:

How to pass CustomActionData to a CustomAction using WiX?

This is not the only solution. Depending on your app and its use of the config file there may be simpler ways, such as writing the value to the registry (which requires no code at all) and having your app use that value as an override of the config file value. Or having a config utility that the user runs afterwards to enter the values, which has the advantage of being easier to build and test, and allows the user to change the value in a valid way.

Community
  • 1
  • 1
PhilDW
  • 20,260
  • 1
  • 18
  • 28