Hey guys,
This should be simple, but I'm having trouble.
I am using c# to run a specific command that I have stored in a variable.
I would like to get the response from the cmd run into a variable after it is executed.
for example, if I run a curl command in cmd.exe, how can I get the results returned into a variable to use in zenno?
Here's the code I have so far...
This should be simple, but I'm having trouble.
I am using c# to run a specific command that I have stored in a variable.
I would like to get the response from the cmd run into a variable after it is executed.
for example, if I run a curl command in cmd.exe, how can I get the results returned into a variable to use in zenno?
Here's the code I have so far...
Код:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/c "+ project.Variables["cmd"].Value;
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();