Hi,
To run all commands from C# application i creates Process class in which main process i am passing as an arguments to cmd.exe as given below:
ProcessStartInf o psi = new ProcessStartInf o("cmd.exe", @"/c myapp.pl");
psi.RedirectSta ndardOutput = true;
psi.RedirectSta ndardInput = true;
psi.UseShellExe cute = false;
psi.CreateNoWin dow = true;
psi.LoadUserPro file = true;
//provided domain/user name and password also
Process proc = new Process();
proc = Process.Start(p si);
But this will create two processes cmd.exe and myapp.pl. Is there any alternative to cmd such that it will create only myapp.pl. or is there any switch that can be use with cmd such that it will not create cmd.exe window.
Please not that i am providing user/domain and password and thus psi.loadUserPro file is true and because of this it will definately creat new window as process will be run in the new security user context.
Thanks
To run all commands from C# application i creates Process class in which main process i am passing as an arguments to cmd.exe as given below:
ProcessStartInf o psi = new ProcessStartInf o("cmd.exe", @"/c myapp.pl");
psi.RedirectSta ndardOutput = true;
psi.RedirectSta ndardInput = true;
psi.UseShellExe cute = false;
psi.CreateNoWin dow = true;
psi.LoadUserPro file = true;
//provided domain/user name and password also
Process proc = new Process();
proc = Process.Start(p si);
But this will create two processes cmd.exe and myapp.pl. Is there any alternative to cmd such that it will create only myapp.pl. or is there any switch that can be use with cmd such that it will not create cmd.exe window.
Please not that i am providing user/domain and password and thus psi.loadUserPro file is true and because of this it will definately creat new window as process will be run in the new security user context.
Thanks