Some questions - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

MarcB
Posts: 5
Joined: Mon Mar 12, 2007 3:07 pm

Some questions

Hi,

I'm currently looking for an install builder and so far, this product has the best potential. I'm trying it out now, but I still have a few questions. Let me start with a brief explanation of what I need to do with my install package.

We have developed a Java application that requires the use of JBoss, the J2RE SDK, some MS SQL/Oracle scripts to be installed, some connection files that need to be edited dependent on the MS SQL/Oracle configuration (ie. database name that will be created) and a .war file which is our actual application.

JBoss can be downloaded as a compressed archive and just needs to be extracted to some directory.
Question 1:
I wish to include the extracted JBoss folder (with its subs) and have the installer ask for a location to install it to. How can this be done? Can I create a variable that I can also use to copy the .war file to later on? If so, how?

J2RE is a install file.
Question 2:
Can I have my installer execute the J2RE installation and wait for the result of that? If so, how?

I need to setup a database and run 4 sql script files.
Question 3:
Can I have the installer ask for the type of database used (either MS SQL or Oracle) and then for that database get the connection parameters to create the database and run the scripts in it? I have seen the MS Sql connection page and I have added the scripts, but not tested it yet.

The connection/configuration files need to be installed in the BIN folder of JBoss and need to be modified dependent on the database creation.
Question 4:
Can this be done? I recon I need a variable for the JBoss folder (see above) and the database + connection settings need to be in variables.

I hope someone can help me out so I will have a working install before my trial version ends ;)

Thanks
Marc
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Marc,

Thank you for your interest in Advanced Installer.

1. You can create a "New Folder->Regular" under the "Application Folder" and add all the JBoss file there.

2. You can add the J2RE as prerequisite. Here are more details on how to use prerequisites in Advanced Installer:
http://www.advancedinstaller.com/user-g ... tware.html

3. Advanced Installer offer support to run SQL script during installation. For more details about this please see:
http://www.advancedinstaller.com/user-guide/sql.html
http://www.advancedinstaller.com/user-g ... ction.html
http://www.advancedinstaller.com/user-g ... cript.html
http://www.advancedinstaller.com/user-g ... l-sql.html

4. To do this you can to create a VBS custom action (that writes some text in a configuration file). The BIN folder of JBoss indicates to: "Application Folder\JBoss\Bin". To access a property in a VBS custom action you can use this code:

Code: Select all

strValue = Session.Property("PROPERTY")
The Server, Port, etc connection properties are listed in the "SQLConnectionDlg" in the "Properties" list ("SERVER_PROP" for Server, etc).

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
MarcB
Posts: 5
Joined: Mon Mar 12, 2007 3:07 pm

regarding my 3rd question, I've done the following:

In the Install Parameters I created the following properties:

db_pass value blank
db_port value 1433
db_server value (local)
db_user value sa

Then I created a new dialog called ServerSettings and added 4 boxes to it.
The first box I gave the property name db_server (from the pick list) the second I has the property name db_port, third is db_user and fourth is db_pass.

Then I went to the SQL Scripts part and created a new connection with the following settings:

Conection Type: MS Sql server / MSDE
Connection mode: ODBC Driver
ODBC Driver: SQL Server
Server: [db_server]
Port: [db_port]
Username: [db_user]
Property for the password: [db_pass]

Database: MyDB
create when not exist is on.

After running the package, I can fill in the ServerSettings screen but when it tries to connect to the server, it fails. Even if I specify a different username for the server, it still prompts that user sa is invalid or something.

What am I doing wrong here?

Regards,
Marc
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Marc,

First note that you use private properties (not passed from UI to Execute sequence). You need to use public properties (upper cases).

But note that Advanced Installer already comes with a built in dialog (SQLConnectionDlg) for the SQL connection. In the "Dialogs" page choose "Add Dialog..." and select "SQLConnectionDlg".

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
MarcB
Posts: 5
Joined: Mon Mar 12, 2007 3:07 pm

thanks again gigi.

I'm now able to create the database (if not exist) but now I need to find out what is wrong with my scripts :?
They run fine using SQL Manager 2005 but not with AI (yet).

Return to “Common Problems”