If I put in my code next statements work:
private void Install_Click(object sender, EventArgs e)
{
var lin =File.ReadLines(path + "installer.ini").ToArray();
var license = lin.Select(line => Regex.Replace(line, @"license=.*", "license=yes"));
File.WriteAllLines(installerfilename, license);
}
in installer.ini
I will have :license=yes
.
But if I add another one, , just the second one will be work .
private void Install_Click(object sender, EventArgs e)
{
var lin =File.ReadLines(path + "installer.ini").ToArray();
var license = lin.Select(line => Regex.Replace(line, @"license=.*", "license=yes"));
File.WriteAllLines(installerfilename, license);
var lmgr_files = lin.Select(line => Regex.Replace(line, @"lmgr_files=.*", "lmgr_files=true"));
File.WriteAllLines(installerfilename, lmgr_files);
}
In installer.ini
remain license=no
and will be lmgr_files=true
.
How I can make the second code to work, and way doesn't work?