我正在尝试使用不同的用户凭据启动.exe文件。它不断返回“未知用户名或密码错误”错误,但我已经确认这些是正确的。有没有办法进一步调试这个或我的代码有什么问题?
using System.Diagnostics;
using System.Security;
using System.Security.Principal;
using System;
//using System.ComponentModel;
//using System.IO;
namespace MTEK_856_as_Admin
{
class Program
{
static void Main()
{
SecureString password = new SecureString();
password.AppendChar('p');
password.AppendChar('a');
password.AppendChar('s');
password.AppendChar('s');
Process process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.WorkingDirectory = "\\\\htohna02\\ERP\\EDIData\\";
process.StartInfo.FileName = "MTEK_856.exe";
process.StartInfo.Domain = "am.mds.xxxxx.com/AMU";
process.StartInfo.UserName = @"Admin";
process.StartInfo.Password = password;
process.Start();
}
}
}