Hola necesitaria saber si alguien ha tenido el mismo problema y si
encontraron alguna solucion.
Tengo una aplicacion que corre como un servicio. Esta llama a un archivo
BAT. que a su ves este llama a otro que realiza una serie de procesos. Aqui
va el codigo
El servicio que corre :
private static void RunProgram( string programName) {
try {
//Declare and instantiate a new process component.
Process myProc = new Process();
//Do not receive an event when the process exits.
myProc.EnableRaisingEvents = false;
//Start the process, and assign it to the process component.
myProc.StartInfo.FileName = programName;
ServiceLog.WriteEntry("ServiceRM",@"Executing program " +
programName ,ServiceLogEventType.Information);
myProc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
myProc.Start();
}
catch (Exception ex) {
ServiceLog.WriteEntry("RmdMonSvc",@"Exception executing program " +
programName + ": " + ex.Message ,ServiceLogEventType.Error);
}
______________________________________________
La aplicacion llama al Bat [Restart.bat] cuyo contenido es :
call c:\Proyectos\Test\Test.bat
exit
______________________________________________
[Test.bat] realiza lo siguiete :
cd\
cd c:\Proyectos\Prueba\
pskill Prueba.exe
call .\Dll\Prueba.exe .\Config.txt
El problema que tengo es que no logro que se ejecute todo el bat Test.bat.
hace el pskill y cuado llama al .\Dll\Prueba.exe no pasa nada. Probe con
START .\Dll\Prueba.exe pero tampoco.
Si alguien me podria ayudar desde ya estaria muy agradecido.
Saludos
Leer las respuestas