string path=@"\Setup\Installer";
var files = Directory.GetFiles(path);
foreach (var item in files)
{
string content = File.ReadAllText(item);
Regex r = new Regex("Guid=\"(\\S*)\"");
MatchCollection maches = r.Matches(content);
for (int i = maches.Count-1; i >=0; i--)
{
Match match = maches[i];
content = content.Remove(match.Index, match.Length).Insert(match.Index, "Guid=\""+Guid.NewGuid().ToString().ToUpper()+"\"");
}
Console.WriteLine(content);
File.WriteAllText(item, content);
}