ここで問題があります。
string strDir = @"cd /d d:\dirc";
string strCmd = @"gpg --output d:\dirop\outputfile.TXT --decrypt d:\dirip\encfile.enc";
string strPass = TheWCF.GetPassphrase(); \\Which will return a string value.
Process pr;
ProcessStartInfo args = new ProcessStartInfo("cmd.exe");
args.RedirectStandardInput = true;
args.RedirectStandardOutput = true;
args.UseShellExecute = false;
args.WindowStyle = ProcessWindowStyle.Normal;
pr = Process.Start(args);
pr.StandardInput.WriteLine(strDir);
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();
pr.StandardInput.WriteLine(strCmd);
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();
ここまではすべて問題ありませんが、この時点で cmd プロンプトはパスフレーズを要求します...ここでコードビハインドからパスフレーズを渡す方法 (ハードコードできない別のサービスから取得したパスフレーズ) 例:
string strPassPhrase=TheWCF.GetPassphrase();
この strPassPhrase をコマンド プロンプトに渡す方法は? 方法を提案してください よろしくお願いします