decryptedPassword

This commit is contained in:
2025-04-29 14:33:00 -07:00
parent 31b5a4925b
commit e50a90f0fc
4 changed files with 21 additions and 15 deletions

View File

@ -17,7 +17,7 @@ internal static partial class HelperInfinityQS
}
}
private static void RunMI()
private static void RunMI(string decryptedPassword)
{
#pragma warning disable CA1416
string processName = "iispcmi.exe";
@ -27,7 +27,7 @@ internal static partial class HelperInfinityQS
Domain = "Infineon",
UseShellExecute = false,
UserName = "ecfisysadmin",
PasswordInClearText = "j(1(P%xB=g}3w9db",
PasswordInClearText = decryptedPassword,
WorkingDirectory = "C:/Program Files (x86)/InfinityQS International/ProFicient/Applications"
};
TimeSpan timeSpan = new(DateTime.Now.AddDays(7).Ticks - DateTime.Now.Ticks);
@ -36,10 +36,11 @@ internal static partial class HelperInfinityQS
#pragma warning restore CA1416
}
internal static bool Select(AppSettings appSettings, ILogger<Worker> logger)
internal static bool ProcessStart(AppSettings appSettings, ILogger<Worker> logger)
{
logger.LogInformation(appSettings.FileWatcherConfiguration.Company);
RunMI();
string decrypted = RijndaelEncryption.Decrypt(appSettings.InfinityQSConfiguration.EncryptedPassword, appSettings.FileWatcherConfiguration.Company);
RunMI(decrypted);
return true;
}
}