Apparently there's no such thing as echo.exe, it's a part of cmd.exe

This commit is contained in:
2023-03-28 13:26:55 +02:00
parent 4032055e10
commit 79a708f7d3

View File

@@ -40,8 +40,8 @@ namespace Password_Generator
{
StartInfo = new ProcessStartInfo
{
FileName = "echo", //TODO: pipe the return value of RandomStr to gpg with the --quiet --encrypt --recipient {recipient} flags
Arguments = $"{RandomStr(length, no_symbols)} | gpg --quiet --encrypt --recipient {recipient}",
FileName = "cmd.exe", //TODO: pipe the return value of RandomStr to gpg with the --quiet --encrypt --recipient {recipient} flags
Arguments = $"echo {RandomStr(length, no_symbols)} | gpg --quiet --encrypt --recipient {recipient}",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true