Run install scripts
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user