Execute an external program from a Windows Service

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top