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 refer external file in USER_INSTALL_FOLDER during installation?
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
Sep 03, 2018
09:13 AM
How to refer external file in USER_INSTALL_FOLDER during installation?
I am using InstallAnywhere to install my java application. As a pre-install step I am taking database details from the user and storing it in an XML which is in install Directory. At the time of installation I want to refer this xml file to make DB connection. How can I configure installanywhere to refer to this external file at the time of installation? I don't want to bundle it with installer exe. Mini Militia App Lock 7Zip
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 20, 2018
03:34 AM
You can create a file similar to what is shown below, that ships with your application. You could call it, say, connection.xml:
$CONNECTION_USER_NAME$
$CONNECTION_PASSWORD$
$CONNECTION_DATABASE$
Collect the user input into InstallAnywhere variables that match the variables you embed in the template XML file. In this example these would be $CONNECTION_USER_NAME$, $CONNECTION_PASSWORD$ and $CONNECTION_DATABASE$.
Add the "Modify Text File - Single File" Action to your project. Check the "Substitute InstallAnywhere variables in file" checkbox. This will automatically replace your embedded IA variables with the values collected from the user.
After the "Modify Text File - Single File" Action completes, the variables in the file will be replaced with the values the user entered. You can then use connection.xml to create your database connection.
In post-installation you could use the Delete File Action to remove the XML file. Alternately, you could run the "Modify Text File - Single File" Action again to search for and replace the password with a series of asterisk, or some other masking character.
Cheers!
Collect the user input into InstallAnywhere variables that match the variables you embed in the template XML file. In this example these would be $CONNECTION_USER_NAME$, $CONNECTION_PASSWORD$ and $CONNECTION_DATABASE$.
Add the "Modify Text File - Single File" Action to your project. Check the "Substitute InstallAnywhere variables in file" checkbox. This will automatically replace your embedded IA variables with the values collected from the user.
After the "Modify Text File - Single File" Action completes, the variables in the file will be replaced with the values the user entered. You can then use connection.xml to create your database connection.
In post-installation you could use the Delete File Action to remove the XML file. Alternately, you could run the "Modify Text File - Single File" Action again to search for and replace the password with a series of asterisk, or some other masking character.
Cheers!
