I have this very simple batch file that contains one command:

xsltproc -o output.html stylesheet.xsl input.xml

When I double-click the batch file, everything works fine. However, the batch file doesn't work when I execute it from my vb.net application:

Dim p As New System.Diagnostics.Process
p.StartInfo.FileName = "[I]path[/I]\go.bat"

cmd seems to open briefly, but the ouput.html file is not created.

Any ideas?


Thanks for the reply, Jx_Man. The shell function certainly works for executing the .bat file. I figured out what was wrong. My .bat file used relative links to the stylesheet, xml input, and html output. What I didn't realize (because the cmd window opened and closed so fast) is that relative links in the bat file are relative to where the VB.net application resides, not where the batch file resides. It turns out that I was successfully creating my html output, but it was outputing somewhere unexpected.

Live and learn, I guess.

Thanks for the reply.

This question has already been answered. Start a new discussion instead.