file-watcher/Helpers/HelperInfinityQS.cs
2024-10-22 09:48:28 -07:00

31 lines
923 B
C#

using File_Watcher.Models;
using System.Diagnostics;
namespace File_Watcher.Helpers;
internal static partial class HelperInfinityQS
{
private static void RunMI()
{
#pragma warning disable CA1416
ProcessStartInfo processStartInfo = new("iispcmi.exe")
{
Domain = "Infineon",
UseShellExecute = false,
UserName = "ecfisysadmin",
PasswordInClearText = "j(1(P%xB=g}3w9db",
WorkingDirectory = "C:/Program Files (x86)/InfinityQS International/ProFicient/Applications"
};
Process process = Process.Start(processStartInfo) ?? throw new NullReferenceException(nameof(Process));
process.WaitForExit();
#pragma warning restore CA1416
}
internal static bool Select(AppSettings appSettings, ILogger<Worker> logger)
{
logger.LogInformation(appSettings.Company);
RunMI();
return true;
}
}