I have to run a .bat file from c#... I use this method.
file = "C:\\Diego\\PublishCore\\Startup_service.bat";
ProcessStartInfo psi = new ProcessStartInfo();
psi.CreateNoWindow = true;
psi.FileName = file;
psi.UseShellExecute = true;
psi.Verb = "runas";
Process.Start(psi);
.BAT is executed... but the action I ask to perfom it does not execute...
If my .bat says MKDir MyDir
... Its creates a Directory called MyDIr
with no problems.
But when my bat says dotnet myApp.dll
, a cmd Windows opens and closes, but it does not start myApp aplication....
If a doublé-click my .bat is runs fine.
What I am missing? Why the aplication does not start?