Comment passer plusieurs arguments en processStartInfo?

Je veux exécuter certains cmd commande à partir de c#code. J'ai suivi certains blogs et tutoriel et j'ai la réponse, mais je suis à peu confus, j'ai.e comment dois-je passer plusieurs arguments?

Je utiliser le code ci-dessous:

System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = 
...

Quel sera le startInfo.Arguments valeur pour la ligne de commande suivante de code?

  • makecert -sk server -sky exchange -pe -n CN=localhost -ir LocalMachine -is Root -ic MyCA.cer -sr LocalMachine -ss My MyAdHocTestCert.cer

  • netsh http add sslcert ipport=127.0.0.1:8085 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF} clientcertnegotiation=enable

InformationsquelleAutor Amit Pal | 2013-02-25