You would think this would be simple... From the command line I can execute
c:\windows\system32\cscript c:\windows\system32\iisext.vbs /ListFile
But when I try it from managed code...
Process proc = new Process();
proc.StartInfo.FileName = @"c:\windows\system32\cscript";
proc.StartInfo.Arguments = @"c:\windows\system32\iisext.vbs /ListFile";
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.Start();
proc.WaitForExit();
using (StreamReader sr = proc.StandardOutput) {
...
I get this error:
Input Error: Can not find script file "c:\windows\system32\iisext.vbs"
What am I missing?
Thanks