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!

NickGreen
Posts: 5
Joined: Wed Jul 10, 2019 7:53 am

Rebuild installer on demand

Hey, I have a question. For example, I have an installer project that is compatible with multiple languages (it takes some time to build it.) In the installer project, there is a property "MYPROPERTY". I want to set it dynamically depending on user's cookie or something. Is it possible for example that when the user clicks the download button I run a script that builds(just adds a value to my property) the project without building entire project (which takes some time)? If it's possible, how could I achieve this?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Rebuild installer on demand

Hello Nick and welcome to Advanced Installer forums,

First of all, please accept my apologies for the delayed reply, but we were quite busy lately.

In what regards your request, I am afraid that is not possible.

Please let me know if there is anything else I could help you with and I will be glad to assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickGreen
Posts: 5
Joined: Wed Jul 10, 2019 7:53 am

Re: Rebuild installer on demand

So is there any other way, I can pass some value to installer dynamically without losing a bunch of time?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Rebuild installer on demand

Hello Nick,

For instance, you can pass a property value during the installation process using a command line as it follows:

msiexec.exe /i <path_to_your_msi> YOUR_PROPERTY="YourValue"

Another option would be to use the /SetProperty command option as explained in the "Set Property Command Option" article.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickGreen
Posts: 5
Joined: Wed Jul 10, 2019 7:53 am

Re: Rebuild installer on demand

And does any of these solutions work with .exe file? I don't use .msi...
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Rebuild installer on demand

Hello Nick,

The first method is for setting a property's value at install time and yes, it works for both .MSI and .EXE.

The second method works for the .AIP file only as explained in the provided link. This command is similar to creating the property manually in your project.

Code: Select all

AdvancedInstaller.com /edit MyProject.aip
    /SetProperty PROPERTY="Value"
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickGreen
Posts: 5
Joined: Wed Jul 10, 2019 7:53 am

Re: Rebuild installer on demand

When I'm trying to run

Code: Select all

msiexec.exe /i <path_to_your_msi> YOUR_PROPERTY="YourValue"
I'm getting error:

Code: Select all

This installation package could not be opened. Contact the applkication vendor 
to verify that this is a valid Windows Installer package.
Could you please collaborate on that?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Rebuild installer on demand

Hello Nick,

I forgot to mention that, in order to achieve that for an EXE setup, you should use the following command:

Code: Select all

<path_to_your_exe> YOUR_PROPERTY="YourValue"
I apologize for that.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickGreen
Posts: 5
Joined: Wed Jul 10, 2019 7:53 am

Re: Rebuild installer on demand

That works! But now the problem is that when I set the argument, installer launches itself... I want to set argument, then let user download the app and he should run the installer himself whenever he wants with my argument.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Rebuild installer on demand

Hello Nick,

Yes, the installer launches. As I have explained previously (in my first thread), this is used to set a property during the installation process.

If you want to do this before delivering the product to your users, you will have to do that from within Advanced Installer and then the package must be built.

This can either be done manually by opening the project, setting your property and then building your project, or from withing the command line by using the "/SetProperty" command. However, you will still need to build the project, otherwise the change will not take place.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”