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!

philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Append connection details to config file.

Hello,

As part of my installer I ask teh user to specify the type of system they are installing my application on. These values are typicall "SQL Server", "Exchange Server", "Citrix Management" plus a few more. When a user selects a certain type i need to provide an addiotnal configuration file.

For example, I have this set at the moment so when the system type = "SQL Server" then download "sqlconfig.conf" which works as expected. I've looked at building in the SQL Server connection details using the SQL dialog and would like to take the information from this dialog and fill in the new config.

The config is a template

Code: Select all

# Read metrics from Microsoft SQL Server
[[inputs.sqlserver]]
 
   servers = [
    "Server=xxx.xxx.xxx.xxx;Port=1433;User Id=<user>;Password=<pw>;app name=aplication;log=1;",
   ]
So when the user installs my app and they select SQL server they would
1) be directed to the SQL Connect dialog and enter their details.
2) The installer goes off and does its thing, installs my application and downloads the sqlconfig.conf file from my server.
3) The information the user entered is inserted into the config file.

Can we do this?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Append connection details to config file.

Hello,

Yes, you should be able to achieve this by using our XML Updates support.

Also, within "Files and Folders" page you can configure a file download operation too.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Re: Append connection details to config file.

HI Daniel,

Thanks for this. I'll look into the XML file option. I'm planning on downloading the configuration file from an http source which is working, i just need to capture the users input and insert it into my config file once it's downloaded.

Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Append connection details to config file.

You are always welcome.

If you have any questions or doubts do not hesitate to write us back.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Re: Append connection details to config file.

Thanks Daniel.

I think i might be approaching this from the wrong angle. This config that is generated will be unique to each installation - I think i might just build the config using installer builder and only generate the config when a specific system type is selected.

That seems a little more straight forward than downloading the config and then populating the required info.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Append connection details to config file.

You are always welcome Phil.

Yes in this case you can try to make use only of our "XMl File" support.

To condition the XML file installation just go under the "Install" tab and select an installation component the XML file resource be bound with. Then go to "Organization" page, select the related component and set the desired install condition expression in the "Condition" field.

Have a look on our "Install resources based on the OS version" user guide article which could be useful for your requirements too.

If there is anything else we can help you with just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”