Starting Firefox using Process.Start: Firefox not starting when you set Usename and Password

Posted by Mohammadreza on Stack Overflow See other posts from Stack Overflow or by Mohammadreza
Published on 2008-12-23T09:46:33Z Indexed on 2010/04/12 12:23 UTC
Read the original article Hit count: 990

Hi there.

When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to work fine. But when I specify a username and password of another account (a member of Users), nothing seems to happen. The same code works fine with Calc.exe or IE. This is weird. Any ideas?

Here is the code:

System.Diagnostics.ProcessStartInfo pInfo = new System.Diagnostics.ProcessStartInfo();
pInfo.CreateNoWindow = false;
pInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
pInfo.WorkingDirectory = "{WorkingDirectory}";
pInfo.Arguments = "{CommandLineArgs}";
pInfo.FileName = "{ExecutableAddress}";
pInfo.ErrorDialog = true;
pInfo.UseShellExecute = false;
pInfo.UserName = "{LimitedAccountUserName}";
pInfo.Password = "{SecureLimitedAccountPassword}";
System.Diagnostics.Process.Start(pInfo);

Thanks everyone.

© Stack Overflow or respective owner

Related posts about c#

Related posts about processstartinfo