Process p = new Process();
p.StartInfo.FileName = @"D:\Program Files\Tencent\QQ\Bin\QQ.exe";
p.StartInfo.Arguments = "QQ.exe";
p.StartInfo.UserName = "administrator";
SecureString ss = new SecureString();
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.WorkingDirectory = @"D:\Program Files\Tencent\QQ\Bin";
p.Start();
如代码,提示拒绝访问,当前用户administrator没有密码。
需要怎么设置才能在前台打开程序,我是在window服务中操作的,服务是用System账户启动的