public void AddExe(string file, string newFileName, string url, bool includeInLayout, string installCondition, string rollbackInstallCondition , string installArguments) { OM.WixAuthoringOM.Bundle.Chain.ExePackageElement exe = new OM.WixAuthoringOM.Bundle.Chain.ExePackageElement(); exe.Name = System.IO.Path.GetFileName(file); if (!String.IsNullOrEmpty(newFileName)) exe.Name = newFileName; exe.SourceFilePathT = file; exe.Id = "Id_" + exe.Name; exe.Vital = "no"; exe.Cache = "yes"; exe.CacheId = exe.Id; exe.SourceFile = exe.Name; if (!includeInLayout) exe.DownloadUrl = url; exe.PerMachine = "yes"; exe.InstallCommand = " "; exe.RepairCommand = " "; exe.UninstallCommand = " "; exe.DetectCondition = "1=2"; if (!string.IsNullOrEmpty(installArguments)) { exe.InstallCommand = installArguments; } if (!string.IsNullOrEmpty(installCondition)) { exe.InstallCondition = installCondition; } Wix.Bundle.Chain.Packages.Add(exe); CopyPayloadToLayout(file, newFileName, true); }
public void AddExe(string file, string newFileName, string url, bool includeInLayout, string installCondition, string rollbackInstallCondition , string installArguments) { OM.WixAuthoringOM.Bundle.Chain.ExePackageElement exe = new OM.WixAuthoringOM.Bundle.Chain.ExePackageElement(); exe.Name = System.IO.Path.GetFileName(file); if (!String.IsNullOrEmpty(newFileName)) exe.Name = newFileName; exe.SourceFilePathT = file; exe.Id = "Id_" + exe.Name; exe.Vital = "no"; exe.Cache = "yes"; exe.CacheId = exe.Id; exe.SourceFile = exe.Name; if (!includeInLayout) exe.DownloadUrl = url; exe.PerMachine = "yes"; exe.InstallCommand = " "; exe.RepairCommand = " "; exe.UninstallCommand = " "; exe.DetectCondition = "1=2"; if (!string.IsNullOrEmpty(installArguments)) { exe.InstallCommand = installArguments; } if (!string.IsNullOrEmpty(installCondition)) { exe.InstallCondition = installCondition; } Wix.Bundle.Chain.Packages.Add(exe); CopyPayloadToLayout(file, newFileName, true); }