I am trying to build a .NET wrapper around the 1Password CLI tool in order to manage our vaults from within our internal tools, however I can't seem to be able to send the input. It appears that it's not using the usual stdin for inputing the password. Is there a way to launch a process and send it keystrokes instead of using stdin?
The following does NOT work, the executable does NOT receive the input:
ProcessStartInfo processStartinfo = new ProcessStartInfo(_opPath, arguments)
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true
};
Process process = Process.Start(processStartinfo);
process.StandardInput.WriteLine("password");
process.StandardInput.Flush();