G
Greg
I'm trying to run an external command-line file converter from a Windows
Service but it's not working. If I run it from a normal app it works fine.
I am able to run other EXEs from my Windows Service without any problems. I
think this problem is related to the capturing of the result.
Basically, the converter is an Excel document converter. I use the greater
than sign to capture the result to a file because it simply writes to the
screen. The file always ends up empty when called from the Windows Service,
but works fine when called from a normal app.
Here's what I'm doing:
xlhtml.exe c:\test.xls > c:\test.txt
Code:
Process.Start("cmd.exe", "/c c:\xlhtml.exe c:\test.xls > c:\test.txt")
I also tried it using the System.Diagnostics.ProcessStartInfo way.
Is there anything I can do to get this to work?
Service but it's not working. If I run it from a normal app it works fine.
I am able to run other EXEs from my Windows Service without any problems. I
think this problem is related to the capturing of the result.
Basically, the converter is an Excel document converter. I use the greater
than sign to capture the result to a file because it simply writes to the
screen. The file always ends up empty when called from the Windows Service,
but works fine when called from a normal app.
Here's what I'm doing:
xlhtml.exe c:\test.xls > c:\test.txt
Code:
Process.Start("cmd.exe", "/c c:\xlhtml.exe c:\test.xls > c:\test.txt")
I also tried it using the System.Diagnostics.ProcessStartInfo way.
Is there anything I can do to get this to work?