使用c# ProcessStartInfo运行隐私权
本文关键字:隐私权 运行 ProcessStartInfo 使用 | 更新日期: 2023-09-27 18:11:44
当我尝试运行隐私权时,我一直得到这个错误can't check configuration file 'config.txt: error number 0'
static void StartPrivoxy(Process p)
{
p.StartInfo = new ProcessStartInfo(@"C:'Program Files (x86)'Privoxy'privoxy.exe");
p.Start();
}
目录应该正确。我可以在C:'Program Files (x86)'Privoxy'从命令提示符运行它,并双击它。配置文件在同一目录
我用同样的代码运行其他程序
您是否尝试为该进程设置工作目录?
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();
}