I am trying to make a WiX installer(.msi) with the Wixsharp plugin. The installer is created but I have added a CustomDialog box to fill some user details on it.
I am also having these values in my project config, I want to make these config values to set the default on my custom dialog TextBox
.
Here is my config file.
<appSettings><add key="name" value="UserName" /><add key="position" value="Dev" /></appSettings>
and setting on the dialog load
void dialog_Load(object sender, EventArgs e) { name.Text = configuration.AppSettings.Settings["name"].Value; position.Text = configuration.AppSettings.Settings["position"].Value; }
I tried to read this config by providing the directory path manually(Like, c:/mypath
). It works but as per my understanding, it is working because I am providing the manual path to that file. I want to make this path dynamic so it can read the file and set the values.
Can we achieve this using wixsharp or by c# wpf project? or Do we have some properties which I can set while building the project and read them on the load on CustomDialog?