Hi All,
I need to run couple of batch files using the C# console application. I have implemented the following code.
ProcessStartInf o psi = new ProcessStartInf o ( );
psi.WindowStyle = ProcessWindowSt yle.Normal;
psi.FileName = @”Gen.bat”;
psi.Arguments = args;
psi.UseShellExe cute = false;
psi.RedirectSta ndardOutput = stdout;
psi.WorkingDire ctory = Environment.Cur rentDirectory;
Process process = new Process ( );
process.StartIn fo = psi;
process.Start ( );
Process.WaitFor Exit();
When i tried to execute from my local machine, i didn't get any problem. If i kept the application exe and the batch files in a shared folder of a server machine and i tried to access from client machine, i got the following error message.
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory
Any help would be appreciated.
Thanks In advance
Kiran
I need to run couple of batch files using the C# console application. I have implemented the following code.
ProcessStartInf o psi = new ProcessStartInf o ( );
psi.WindowStyle = ProcessWindowSt yle.Normal;
psi.FileName = @”Gen.bat”;
psi.Arguments = args;
psi.UseShellExe cute = false;
psi.RedirectSta ndardOutput = stdout;
psi.WorkingDire ctory = Environment.Cur rentDirectory;
Process process = new Process ( );
process.StartIn fo = psi;
process.Start ( );
Process.WaitFor Exit();
When i tried to execute from my local machine, i didn't get any problem. If i kept the application exe and the batch files in a shared folder of a server machine and i tried to access from client machine, i got the following error message.
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory
Any help would be appreciated.
Thanks In advance
Kiran
Comment