I've the below code where I use DevCon.exe to capture something and write it in a file. I parse this file for a need.

```
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = "/C devcon.exe find = port *monitor* >> monitor_Details.txt";
p.StartInfo.CreateNoWindow = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.Verb = "runas";
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardError = true;
p.Start();
p.WaitForExit();

StreamReader sr = p.StandardOutput;
string log = sr.ReadToEnd();
StreamWriter sw = p.StandardInput;
sw.WriteLine("hi.txt");
p.Close();

```

Here, I see the txt file being blank all the time. Nothing is written into the text file.
Is there anything wrong? I also checked variable log which gets assigned to 

> 
> sr.ReadToEnd()
> 
> 
> 

even then log is always blank. 

Pl help why shell commands are not getting executed: