public async Task InstallDependency(string downloadKey, string labelName)
{
string originDownloadUrl = await InstallerCommon.GetDownload(downloadKey);
this.SetStatusLabelSync("Downloading " + labelName + ". Please wait...");
await downloader.DownloadFileTaskAsync(originDownloadUrl, Path.Combine(this.tempPath, downloadKey + "_inst.exe"));
this.SetStatusLabelSync("Installing " + labelName + ". Please wait...");
await Task.Run(() => {
try
{
Process.Start(Path.Combine(this.tempPath, downloadKey + "_inst.exe"), "/s").WaitForExit();
}
catch
{
return;
}
});
}