I am trying to pass arguments to the SysInteranls Autologon.exe file, and am unable to do so. This is the C# Code that I am using:
string usr = usrTextBox.Text.ToString();
string auto = autologon;
string domain = STORES;
string pass = password;
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = "Autologon.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = usr + domain + pass;
Process.Start(startInfo);
It works if I set the startInfo.Arguments = "USER DOMAIN PASSWORD"; Any help would be greatly appreciated.
Todd
As per your last statement, You need a space in between them.
To keep the code cleaner, use the
string.Formatmethod.