(1) The command list will most likely come from whatever executables are found in your %PATH%. You can figure out your list by finding all .exe/.bat/other executable files in every folder specified by %PATH%. You may not even need to know which apps are available, the Process.Start method will find them for you. (see below)
(2) You can run a command-line tool programmatically using:
System.Diagnostics.Process.Start("notepad.exe"); // located using %PATH%
To capture the output, you have to redirect it like this:
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(@"ipconfig");
psi.RedirectStandardOutput = true;
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
psi.UseShellExecute = false;
System.Diagnostics.Process myProcess;
myProcess = System.Diagnostics.Process.Start(psi);
System.IO.StreamReader myOutput = myProcess.StandardOutput; // Capture output
myProcess.WaitForExit(2000);
if (myProcess.HasExited)
{
string output = myOutput.ReadToEnd();
Console.WriteLine(output);
}
(3) Probably the same answer as 1