istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Client-specific MSI with custom public properties

Hello,

The thing I wish to implement using Advanced Installer is the following :

Say there are two setups, one of product "S" for the server, and one of product "C" for the client user. The setup of "C" would be a MSI file, included initally inside the setup of "S".
When "S" is installed on the server, the admin choses a few properties during installation (say for example the server internet URL and port number). The MSI setup of "C" is also copied somewhere in the wwwroot of IIS.
When a user proceeds to download the setup of "C", I wish the MSI setup to somehow be able to retrieve the chosen settings from the server (internet URL and port number) and write them to the user's registry for example, or set them as MSI public properties at Wizard stage. This would avoid the need for each user to manually specify the same values during the setup of "C", which could lead to lots of errors, support requests and loss of time.

How could such a thing be achieved with Advanced Installer please ?

If not, could it be achieved using the MSI technology at all ?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Client-specific MSI with custom public properties

Hello and welcome to Advanced Installer forums ,

Unfortunately there's no predefined support for this in Advanced Installer but you could try developing custom actions for this functionality.
The closest thing we have is implementing How do I collect installation data and send it to my web server? article. You may also find using the "Client/Server Application" project template useful.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Client-specific MSI with custom public properties

Hi and thanks for your answer.

I considered custom actions and such, but I wonder, would a JavaScript custom action for example be allowed to use Ajax to download a configuration file from a remote server, or would I have to write a custom complied DLL or executable that the custom action would run ?

as for the "send information to server" example, it's nice but it does not seem to allow any custom treatment for the returned data from the server, am I right ?
If this feature could however send a POST request to a server, which would reply with for example a JSON object containing the configuration, could a JavaScript custom action retrieve that response value from somewhere (and how) in order to populate some properties from the members of that JSON object ?

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Client-specific MSI with custom public properties

You're welcome,
or would I have to write a custom complied DLL or executable that the custom action would run ?
.DLL custom actions are most reliable and usually the way to go but you can experiment with alternatives if you find they have more advantages for your current scenario.
it does not seem to allow any custom treatment for the returned data from the server, am I right ?
The HTTP server request response, if any, can be accessed through the Advanced Installer property HttpPostServerResponse. You can parse the value of this property to organize the logic of your installation package.
Here's the similar Server-side user data verification thread you can follow.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Client-specific MSI with custom public properties

Thanks for the answer Mihai.

I also now realize that if the original package "S" can be installed on several servers, it would mean that each client package "C" would have to know which server to contact (the one where it is downloaded from), so there is no real way to hardcode the URL of the server at MSI build-time ...

Are there any solutions or tricks to insert a file or a value in the MSI (even if the server has to run some compiled code), which file or value would contain the URL of the server it is being downloaded from ?

Thanks
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Client-specific MSI with custom public properties

Ok, if anyone ever needs the same info later, I found a way do do it, more details here :

http://stackoverflow.com/questions/1609 ... mmand-line

Return to “Building Installers”