IndyUK Posted November 19, 2008 Posted November 19, 2008 Hi All, I'm trying to run a batch file which calls a jar file. It also sets up environment variables. When I run it by double clicking it works. However if I call it from AutoIt using Run I get an error (as expected). Here's the content of the batch file... set USER_CLASSES=%USER_BASE_CLASSES%;%CLASS_DIR%\UserApplication.jar;%CLASS_DIR%\UserApplication_Stubs.jar set CLASS_PATH="%USER_CLASSES%;%USER_LIBS%" set PATH="%JAVA_DIR%\bin;%INSTALL_DIR%\bin" %DRIVE_DIR% cd %LOG_DIR% start %JAVAW_EXE% -Djava.security.policy=%POLICY% -Djava.library.path="%JAVA_DIR%\bin;%INSTALL_DIR%\bin" -Dshowurl=1 -cp %CLASS_PATH% %PROG_NAME% %CONFIG_URL% exit How do I run the above? Thanks
jbc1 Posted November 19, 2008 Posted November 19, 2008 Can you post you code?? Try running it like this ? RunWait(@ComSpec & " /C " & $pathToBAT, @ScriptDir)
IndyUK Posted November 19, 2008 Author Posted November 19, 2008 (edited) Can you post you code?? Try running it like this ? RunWait(@ComSpec & " /C " & $pathToBAT, @ScriptDir) I'm basically running the following line.. ShellExecute("C:\Lagan\Frontline\TestV6\userstart.bat") Edited November 19, 2008 by IndyUK
BinaryBrother Posted November 19, 2008 Posted November 19, 2008 I'm basically running the following line.. ShellExecute("C:\Lagan\Frontline\TestV6\userstart.bat") Throw a pause in your Batch file to make sure AutoIt isn't passing some sort of parameter... SIGNATURE_0X800007D NOT FOUND
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now