【发布时间】:2016-02-12 02:43:04
【问题描述】:
我正在使用下面的代码来运行具有不同用户的进程。当用户配置文件已经存在或用户登录系统时它工作正常,但是当用户没有登录到该系统时它会出现问题,因为用户配置文件不存在。 我该如何解决这个问题?
ProcessStartInfo myProcess = new ProcessStartInfo(@"C:\Program Files\Internet Explorer\iexplore.exe");
myProcess.UserName = username;
myProcess.Password = MakeSecureString(password);
myProcess.UseShellExecute = false;
Process.Start(myProcess);
【问题讨论】:
标签: c# user-profile