This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Execute script/batch file action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
04:11 PM
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?
ExecuteProcessSupport eps = new ExecuteProcessSupport(bat_file, new String[] {"",""}, bat_out, bat_err );
which always works.
why is that?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 01, 2008
12:34 AM
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.
James
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.
James
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 02, 2008
09:35 AM
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?
when I have .bat to run, how will this installer work in linux?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 02, 2008
10:11 AM
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.