users@glassfish.java.net

Re: automating tasks with asadmin?

From: <glassfish_at_javadesktop.org>
Date: Thu, 05 Feb 2009 14:13:21 PST

Thanks Kedar,

A few things:

1.) http://www.scriptinganswers.com/forum/forum_posts.asp?TID=168 is a dead link.

2.) I'm running Windows 2003 Enterprise SP2 where its supposedly "fixed"

3.) when I call asadmin.bat from the cmd.exe directly, it reports out the correct returncode. It's only when I call asadmin.bat through the subprocess module in python that it doesn't work.

Also note that I can through any other batch file together and have it work correctly. It seems to be an issue only with asadmin.bat and its inner-workings as noted on my post and sample test in the python forum.

I'll try "exit /B %ERRORLEVEL%" in asadmin.bat even though Janey reported that its not a fix to the issue because at this point its the only thing I know of that I haven't tried.

I appreciate the response and hope I can find a solution. I've automated countless other tasks in windows with system calls with no such issue.

TIA :)

Andrew
[Message sent by forum member 'areplogle' (areplogle)]

http://forums.java.net/jive/thread.jspa?messageID=330420