C# 将我的gpg文件保存到其他目录

C# 将我的gpg文件保存到其他目录,c#,windows,gnupg,C#,Windows,Gnupg,我正在进行GPG加密,希望将文件保存到特定目录。。。有人能告诉我怎么做吗。。 我正在使用这个代码 ProcessStartInfo startInfo = new ProcessStartInfo() { WorkingDirectory = @"C:\", CreateNoWindow = false, UseShellExecute = false, Redirec

我正在进行GPG加密,希望将文件保存到特定目录。。。有人能告诉我怎么做吗。。 我正在使用这个代码

        ProcessStartInfo startInfo = new ProcessStartInfo()
        {
            WorkingDirectory = @"C:\",
            CreateNoWindow = false,
            UseShellExecute = false,
            RedirectStandardError = true,
            RedirectStandardInput = true,
            RedirectStandardOutput = true


        };

        startInfo.FileName = "gpg.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;
        startInfo.Arguments = "-e -r myname config.xml";
        using (Process exeProcess = Process.Start(startInfo))
        {

            exeProcess.WaitForExit();
        }
当我这样做时,它会将其保存到APPdata文件夹中。有没有办法将其更改为某个默认文件夹

我是否需要设置一些环境变量来执行此操作

请帮帮我。。如果我不清楚或者我错过了一些非常愚蠢的事情,请告诉我


提前感谢

您不能简单地在输出名称前面加上路径前缀吗?config.xml不是输出名称,而是源文件。。你能帮我把最后的加密文件保存到一个特定的目录吗?你读了命令行上的帮助了吗?我试过@Erno,但加密不起作用!是否添加了足够的引号以便正确处理路径中的空格?我想将config.xml.gpg文件保存在特定路径中!!谢谢你的回复:)这给了我一个错误,说用法:gpg[options]--encrypt[filename]。。你能帮忙吗:(试一下-o而不是-output
 ProcessStartInfo startInfo = new ProcessStartInfo()
        {
            WorkingDirectory = @"C:\",
            CreateNoWindow = false,
            UseShellExecute = false,
            RedirectStandardError = true,
            RedirectStandardInput = true,
            RedirectStandardOutput = true


        };

        startInfo.FileName = "gpg.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;
        startInfo.Arguments = @"-e -r myname c:\MYPATH\config.xml -o c:\MYPATH\config.xml.gpg";
        using (Process exeProcess = Process.Start(startInfo))
        {

            exeProcess.WaitForExit();
        }