Execute an external program from a Windows Service

  • Thread starter Thread starter Xavitin
  • Start date Start date
X

Xavitin

Hello,

I have a piece of code that runs Ok in a normal Windows application,
but not when run as a windows service. The code tries to run an
external program (ARJ32.EXE). The code is :

myProcess.StartInfo.FileName = strRutaARJEXE
myProcess.StartInfo.Arguments = " e -u -y " & strRutaFitxerARJ
& " " & strRutaDescomprimir
myProcess.StartInfo.UseShellExecute = False
myProcess.StartInfo.ErrorDialog = True

myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.StartInfo.CreateNoWindow = False
Try
myProcess.Start()
Catch e As Exception
Debug.WriteLine(e.Message & " " & e.Source)
End Try

No exception is caught and no process runs !!

Thanks,

Xavier
 
Back
Top