nprigent
Posts: 3
Joined: Thu Jul 12, 2018 2:57 pm

Set a specific license per user

Thu Jul 12, 2018 3:04 pm

Hello,

I need to deploy a software for which a license is assigned per each user.
So, actually, I deploy this MSI using the following script:

Code: Select all

@echo off
@cd /D %~dp0

setlocal EnableDelayedExpansion
if %username%==xxxx set varLICENSE="1234 1234 1234 1234"
if %username%==yyyy set varLICENSE="5678 5678 5678 5678"

msiexec /i "software.msi" /qn TRANSFORMS="CUSTOM.mst" LICENSE=%varLICENSE%

endlocal 
Now, I want to replace this script using AdvancedInstaller, but I don't know how to add a condition based on the username and then apply a specific license to this user?

Thanks for your help.

Nicolas

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Set a specific license per user

Fri Jul 13, 2018 9:13 am

Hello Nicolas and welcome to our forums,

In order to achieve what you want, you can go to "Custom Actions" page from the "Custom Behavior" group and add the predefined "Set installer property" custom action. After adding it to the actions group and configuring the property name and value (in your example, the property name could be LICENSE and the value could be 1234 1234 1234 1234), you can condition the execution of this custom action by setting a condition in the "Condition" field from the "Execution Stage Condition" tab.

If this does not help, please give us more details about what you want to achieve.

Regards,
Catlain
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”