Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
C#
How to edit a value/field in a configuration file using wix . My research: my custom dialog which ask for user input will be as:

The user entered value should be Send to custom action.

 public class CustomActions 
{

 [CustomAction] 
public static ActionResult SaveUserInfo(Session session) {

        string name = session["MY_PROPERTY"];

        string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
        if (!Directory.Exists(appdataPath + "Win App"))
            Directory.CreateDirectory(appdataPath + "Win App");

        File.WriteAllText(appdataPath + "Win AppregistrationInfo.conf", name + "," );

        return ActionResult.Success;

    }
}
but i want to search for a field and replace it by the user given input. Help and suggestions are appreciated.


What I have tried:

Custom Actions to Search and replace i can write but couldn't access userinput into the Custom action.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900