Yes you can do it, First of of all you have to make sure that already created XML file is not being removed when application is uninstalled. By default when you uninstall an application files deployed with the MSI will get removed when its uninstalled. To prevent this go to that specific file property and set Permanent
to True
.
You have to add installer class to your set up project. within install method check if the XML file exisit. If then display confirmation message to user. based on the user preference either keep old xml file or add a new file to save the new settings again.
public override void Install(System.Collections.IDictionary stateSaver)
{
//Invoke the base class method
base.Install(stateSaver);
if (File.Exists("XML File path"))
{
DialogResult result = MessageBox.Show("Do you want to use existing setting?","",MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
}
else
{
}
}
}