Dynamically Configuring Built Installer - 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!

CharlesAnthony
Posts: 18
Joined: Wed Oct 07, 2009 9:45 am

Dynamically Configuring Built Installer

Hi,

We're writing java software, which we will supply to our customers. Part of that software is a "client" portion that is distributed to our clients' clients. That "client" portion will be Windows only, and we want to create an installer to install it. The Server portion is *not* windows, or rather, may not be.

All simple so far.

We want to be able to use the "updater" functionality, with the URL pointing to our *clients* website, not our own. In other words, we want to be able to configure the installer *after* it has been built. There are other configuration options that we would want to change too, without using Advanced Installer (or indeed any other windows-only utility, e.g. Orca), based on the customer id.

Ultimately, I think what I'm asking is, is there a way to configure/update a property within the installer without building it all over again?

My first approach was to generate a code that the user enters, like a registration code (but larger - actually, as Based64 encoded URL), which the user then cuts' and pastes into the installer - part of my application would then read that code, which would ultimately contain an update url, and reconfigure the updater.INI (and, indeed, download some more configuration infomartion). Unfortunately, it turns out that the end-users may be very computer illiterate, and cutting-and-pasting a chunk of text from an email may be beyond them. For the same reason, having a license/configuration file as an attachment that the user copies to the install directory is also too complicated.

What I'd like to do - or rather, what the sales team would like us to be able to do ! - is to be able to email a URL to the end user, which links to a dynamic process that modifes the installer and customizes it before returning it as a stream - e.g. http://example.com/my-procut/download.msi?customer-id=123

I realise that this is both a) unusual and b) odd - but is it completely beyond the realms of practicality?

With Kind Regards,

Charles.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Dynamically Configuring Built Installer

Hello Charles,

Please note that the only way to change a property and keep its value that way is to store it in the .msi database. This means a tool would have to know how to edit the .msi. The only way you could achieve this would be to edit the msi on your server before delivering it, as you described above. You could do this by using the Windows Installer API.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
CharlesAnthony
Posts: 18
Joined: Wed Oct 07, 2009 9:45 am

Re: Dynamically Configuring Built Installer

Hi,

Thanks; unfortunately, as the server will not be running windows, the API would not be available.

Another tack : with Windows installer, it looks to be possible to passic Public Properties when we launch msiexe (e.g. msiexec /i example.msi SAMPLE_PROPERTY=1234)

Is it possible to create public properties with Advanced Installer?

(If so, I could possibly dynamically create a bootstrap.exe that would pass the property to MSIEXEC),

Regards,

Charles.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Dynamically Configuring Built Installer

Hello,

Any property passed to the .msi through msiexec is accessible from within the .msi. In Advanced Installer there is no need to create those Public Properties, you can use them directly. Note that they will have no value if they are not passed to msiexec.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
CharlesAnthony
Posts: 18
Joined: Wed Oct 07, 2009 9:45 am

Re: Dynamically Configuring Built Installer

Hello once more,

In the unlikely event that anyone needs to do anything even remotely similar, I am planning to use 7zip executable stubs from http://7zsfx.info/en/; a visit to http://example.com/client/1234/setup.exe would then go to a java servlet that could create dynmically a setup.exe by concatenating the stub, a text file containing

Code: Select all

;!@Install@!UTF-8!
RunProgram="msiexec /i http://example.com/downloads/real-product.msi CLIENTNUMBER=[b]1234[/b]"
GUIMode="2"
;!@InstallEnd@!
and an empty .7x archive.

In effect, I am pretty much dynamically generating a bootstrap executable.

Yes, this is a very hacky thing to do; but it should work, and it is quite creative! :roll:

Regards,

Charles.

Return to “Common Problems”