Interaction

gregomtl Messages postés 6 Date d'inscription lundi 29 mars 2004 Statut Membre Dernière intervention 4 mai 2004 - 24 avril 2004 à 20:27
mckmonster Messages postés 10 Date d'inscription vendredi 2 mai 2003 Statut Membre Dernière intervention 6 décembre 2007 - 25 avril 2005 à 09:26
Salut comment je pourrai passer cette commande pour qu'elle fonction et soit bien execute ?
Ex.: en cliquant sur un bonton, executer le programme "cmd.exe" et demander d'executer la commande : dir *.exe

Merci de votre aide a tous !

Greg

PS: Mon code est celui-ci dessous.

private void button1_Click(object sender, System.EventArgs e){
/*
linkResult sa variable est : 
xsibatch -r -scene "C:\Softimage\XSI_3.5.1Data\XSI_SAMPLES\Scenes\dog.scn" -startframe 15 -endframe 16
*/

string fileNameabout = "files2render.txt";
TextReader reader;
reader = new StreamReader(fileNameabout);
string linkResult = reader.ReadToEnd();
reader.Close();
MessageBox.Show(""+linkResult,"test de variable lut");

ProcessStartInfo startinfo = new ProcessStartInfo(@"C:\Softimage\XSI_3.5.1Application\bin\SIShell.bat",""+linkResult);
startinfo.WindowStyle = ProcessWindowStyle.Minimized;
Process proc = Process.Start(startinfo);
}

3 réponses

gg00xiv Messages postés 656 Date d'inscription mercredi 22 août 2001 Statut Membre Dernière intervention 11 mars 2005 13
25 avril 2004 à 22:48
Quel est le souci quand tu cliques sur le bouton ?

[Membre du Labo .NET]
Société TechNet-X
0
gregomtl Messages postés 6 Date d'inscription lundi 29 mars 2004 Statut Membre Dernière intervention 4 mai 2004
26 avril 2004 à 14:52
le programme execute bien le fichier
C:\Softimage\XSI_3.5.1Application\bin\SIShell.bat
, mais n'execute pas la commande suivante
"C:\Softimage\XSI_3.5.1Data\XSI_SAMPLES\Scenes\dog.scn" -startframe 15 -endframe 16
as tu une solution pour qu'il puisse l'executer ?

Merci

greg 8-)
0
mckmonster Messages postés 10 Date d'inscription vendredi 2 mai 2003 Statut Membre Dernière intervention 6 décembre 2007
25 avril 2005 à 09:26
Il faut que tu utilise la propriété Arguments de ta variable startinfo.



C'est elle qui passe l'argument à ta commande.
0
Rejoignez-nous