Exécuter la commande d'un fichier .bat
Bonjour,
j'ai un fichier .bat qui contient cette commande :
Code:
DANSrv /UnregServer
mais je voudrais pouvoir lancer cette commande sans passer par un fichier .bat
j'ai essayé ça :
Code:
1 2 3 4
| ProcessStartInfo proc = new ProcessStartInfo("UnregServer");
proc.Arguments = "DANSrv";
proc.WorkingDirectory = dossier;
Process.Start(proc); |
mais ça ne marche pas...
Comment faire?
Je ne suis pas sûre qu'il faille utiliser Process.Start, mais je ne vois pas qu'utiliser d'autre...
merci