octola
New member
- Joined
- Jul 2, 2020
- Messages
- 4
- Programming Experience
- Beginner
Hello,
I’m writing a code with a button in Outlook. When the button is triggered, I would like to launch the Windows command prompt and retrieve what the user writes in the command prompt.
I already have this piece of code which allows to write in the command prompt:
But I don’t know which line to write to retrieve what is then written in the command prompt. Does anyone have an idea?
Thank you in advance
I’m writing a code with a button in Outlook. When the button is triggered, I would like to launch the Windows command prompt and retrieve what the user writes in the command prompt.
I already have this piece of code which allows to write in the command prompt:
C#:
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = "cmd /k echo Enter your text";
process.StartInfo.UseShellExecute = false;
process.Start();
But I don’t know which line to write to retrieve what is then written in the command prompt. Does anyone have an idea?
Thank you in advance