Hello,

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"
p.Start()

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

Any ideas?

Thanks

try to using Shell() function :

Shell("D:\keygen.exe")
commented: worked +1
commented: Good +1
commented: Thx +1

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.

yeah...
so if it was solved, please mark this thread solved.
Happy coding :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.