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
- :
- How to execute a script/batch file from install anywhere
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
Apr 14, 2016
12:01 AM
How to execute a script/batch file from install anywhere
Hi,
I am having a simple .bat file in my project folder which needs to create a folder (mkdir "testfolder") in the installation directory.
How i need to execute this .bat file using execute script/batch from IA 2015SP1 ??
Thanks and Regards,
Chaitanya.
I am having a simple .bat file in my project folder which needs to create a folder (mkdir "testfolder") in the installation directory.
How i need to execute this .bat file using execute script/batch from IA 2015SP1 ??
Thanks and Regards,
Chaitanya.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 15, 2016
02:39 AM
Hello,
Follow the below steps to achieve the script or batch execution using InstallAnywhere.
1.Add the Execute Script/batch file Action as part of your project settings in the respective Sequence phase.
2. In the properties customizer section of the Execute Script/batch file Action, There is text area called Script: where you need to add your platform specific lines of code(Note: the commands must know in which directory it has to execute, so add cd $USER_INSTALL_DIR$ as your first line of code in the script area).
3. The text area allows the end user to leverage the InstallAnywhere Variables like "USER_INSTALL_DIR" in the user script.
4. Add a Check platform rule to the action, to decide the running platform based on script.
5.Build and run the installer.
Solution for your sample create folder task:
batch-
cd $USER_INSTALL_DIR$
mkdir testfolder
script- new folder with a test file)
cd $USER_INSTALL_DIR$
mkdir testfolder
cd $USER_INSTALL_DIR$/ testfolder
touch testfile.txt
Additonal Suggestion: It is also possible to make use of Execute Command action which runs the script or batch file as a whole. By referring the .sh or .bat file in the command line.(Refer manual for more help)
Let me know if this works for you.
Thank You
Follow the below steps to achieve the script or batch execution using InstallAnywhere.
1.Add the Execute Script/batch file Action as part of your project settings in the respective Sequence phase.
2. In the properties customizer section of the Execute Script/batch file Action, There is text area called Script: where you need to add your platform specific lines of code(Note: the commands must know in which directory it has to execute, so add cd $USER_INSTALL_DIR$ as your first line of code in the script area).
3. The text area allows the end user to leverage the InstallAnywhere Variables like "USER_INSTALL_DIR" in the user script.
4. Add a Check platform rule to the action, to decide the running platform based on script.
5.Build and run the installer.
Solution for your sample create folder task:
batch-
cd $USER_INSTALL_DIR$
mkdir testfolder
script- new folder with a test file)
cd $USER_INSTALL_DIR$
mkdir testfolder
cd $USER_INSTALL_DIR$/ testfolder
touch testfile.txt
Additonal Suggestion: It is also possible to make use of Execute Command action which runs the script or batch file as a whole. By referring the .sh or .bat file in the command line.(Refer manual for more help)
Let me know if this works for you.
Thank You