Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

Execute script/batch file action

I tried few times to use this IA action to do few things. it does nor work always. Then i had to write a batch file and call it from the custom code

ExecuteProcessSupport eps = new ExecuteProcessSupport(bat_file, new String[] {"",""}, bat_out, bat_err );
which always works.

why is that?
Labels (1)
0 Kudos
(3) Replies
Level 9

hi ramalaks,
the execute script or batch file action does work and i am using it.
Suppose i am installing a batch file say run.bat in the user install directory,
then i install it and i call it using this command.
Execute script or batch file action:

call $USER_INSTALL_DIR$$/$run.bat
(This command works when there is no space in the name of the folder (USERFOLDER) but if there is space in the user folder say(PROGRAM FILES) the above command wont work)
For the case when there is space in the user folder(PROGRAM FILES) use this command:

call "$USER_INSTALL_DIR$$/$run.bat"

Just try these commands once and you will not require to write custom code for this.
0 Kudos
Level 6

OK I will try that.. "call" wont create a separate cmd window?

when I have .bat to run, how will this installer work in linux?
0 Kudos
Level 20

Of course, you have to convert your Windows batch into Linux/Unix syntax and use Check Platform condition in order to control which one will be executed on the target platform.
0 Kudos