Dear VB gurus,
I have a bat file (called post.bat) that requires an xml filename as a parameter to post it against the server. The post.bat itself calls the setup.bat file that has bunch of class path settings.

I am dynamically creating the xml file in my vb script.

Since I am not sure how to run a bat file along with a parameter from vb script, I created another bat file execute_api.bat, that looks something like this:

@echo off
cd C:temp\
post.bat "C:\Temp\sample.xml"
exit

I am using the following shell command to execute the execute_api.bat file like this

Shell("C:\Temp\execute_api.bat", vbMaximizedFocus)

Now when I run my script in debug mode (ie stepping into each line of my code) the xml is posted successfully. However when I run my script without debug mode, I get the following error:

C:Temp>post.bat sample.xml
Exception in thread "main" java.io.IOException: File <sample.xml> not found in CLASSPATH.
at com.i2.xcore.util.ClassPath.getInputStream(ClassPath.java:210)
at com.i2.xcore.net.Poster.main(Poster.java:569)
Press any key to continue . . .

Can someone please provide me a solution to this problem.

Thanks in advance,
sharabh