首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用C# ProcessStartInfo运行privoxy

使用C# ProcessStartInfo运行privoxy
EN

Stack Overflow用户
提问于 2011-10-19 13:02:15
回答 1查看 419关注 0票数 2

当我尝试运行privoxy时,我一直收到这个错误can't check configuration file 'config.txt: error number 0'

代码语言:javascript
复制
static void StartPrivoxy(Process p)
{
    p.StartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Privoxy\privoxy.exe");
    p.Start();
}

目录应该是正确的。我可以从C:\Program Files (x86)\Privoxy\的命令提示符运行它,然后双击它。配置文件位于同一目录中。

我使用相同的代码来运行其他程序。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-10-19 13:53:03

您有没有尝试为进程设置工作目录?

代码语言:javascript
复制
    static void StartPrivoxy(Process p)
    {
        p.StartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Privoxy\privoxy.exe");
        p.StartInfo.WorkingDirectory = @"C:\Program Files (x86)\Privoxy\";
        p.Start();
    } 
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7816730

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档