Bonjour à tous,
Je suis débutant en c# et voilà mon problème qui je l'espère n'en sera pas un pour vous
J'ai un exe à lancer sur mon serveur web à travers une application c#. Voilà mon code :
System.Security.SecureString strSec = new System.Security.SecureString();
strSec.AppendChar('t');
strSec.AppendChar('o');
strSec.AppendChar('t');
strSec.AppendChar('o');
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.FileName = "Toto.exe";
proc.StartInfo.WorkingDirectory = "C:\\";
proc.StartInfo.UserName = "TOTO";
proc.StartInfo.Password = strSec;
proc.StartInfo.Arguments = ("/TOTO:" + ID.ToString());
proc.Start();
proc.WaitForExit();
Mon soucis est le suivant j'ai une erreur provoqué sur le proc.Start() : "Paramètre incorrect"..... Mais lequel ???
Si vous avez des idées pour me sortir de cette impasse, je les attends avec plaisirs !!!
Par avance, merci.
++
Stef
Partager