Saturday, April 18, 2009

Re: InstallAnywhere details

You are absolutely correct, Execute Script returns the exit code for the action not of the underlying batch/script file. My experience with says that IA execute script does not work correctly in case of DOS batch files.
The reason being, execute run script uses Java Process.getRuntime.exec() thread to run the batch or command passed. Here Process.waitfor() method is used, if the underlying script uses @echo ON inside the script the behavior is very abrupt. Only the first script's 1 to 6th or 7th steps are run after that the script keeps on waiting thereby making the installation hang.

I would suggest to use your own plugin for executing command or batch specifically when the command or script calls another shell to execute the sequence of steps.

In the plugin spawn a thead and dont wait for the thread to complete. here the disadvantage is you will not get the complete the stderr, stdout till the theread completes but its a nice tradeoff done where you want to set gurentee for the underlying command to complete sucessfully.

I have developed a plugin which you can use if you want.




On Thu, Apr 16, 2009 at 6:46 PM, tony prabhu <ruban142003@yahoo.com> wrote:
Hi,
 
I am a beginner with IA and I want to know about the Execute Script/Batch action and how it works. I believe the exit code in this action is only for the action and not for the script or the commands it executes. So, how can i get an exit code for the executed script? Please explain to me in a detailed manner.
 
Thanks
Tony

2 comments:

Unknown said...

How to configure installanywhere project to use custom serial numbers during installation build rather than using the serial numbers generated using the set serial number action.

Swapna said...

Looking for installanywhere professionals.
for details please send in your resume to swapnarajesh04@gmail.com