Run install scripts

This commit is contained in:
2024-06-06 00:39:44 +03:00
parent bc20101795
commit de7c65c27b
2 changed files with 27 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
@@ -75,4 +76,15 @@ public static class ServerCom
return DownloadFileAsync(URl, location, progress, null);
}
public static async Task<string> RunConsoleCommand(string console, string command)
{
Process process = new();
process.StartInfo.FileName = console;
process.StartInfo.Arguments = command;
process.Start();
await process.WaitForExitAsync();
return await process.StandardOutput.ReadToEndAsync();
}
}