blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Serial Validation template

Hi

I am doing a Serial Validation for my installer. I used user defined DLL radio button and specified my DLL as your document says. It's OK, the problem is that I dont want to use the template <###-###>. Could you please tell me how to do that?

Thank you
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

Hi,

The template of the serial number can be changed from the top of the "Package Serial Validation" view, under the "Template" section.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Hi Eusebiu,

I didn't see any options not to use Template, I tried to delete the content in the Template textbox but it's not allowed
SerialValidation.png
SerialValidation.png (1.75 KiB) Viewed 13386 times
My problem is that my generated serial number is not a fixed pattern, for example it could be 1a2b3c-123456 or 1x2y-12345. That's why I don't want to use the template and just call validation function in my DLL. Could you please tell me how to define the template to meet the serial number validation?


Thank you
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

Hi,

In order to avoid using a template for your serial number you can follow the steps below:
- go in the "Dialogs" page and select the "UserRegistragionDlg" dialog
- remove the "Masked Edit" box that is under the "Serial Number" text
- add an "Edit Box" control instead of it and set its property name to the "PIDKEY" property
- while the "Edit Box" is selected go to the "Control Conditions" tab and add the condition below:
  • Condition: SERIAL_VALIDATION = "TRUE"
    Action: Disable
- select the "Next" button of that dialog, go to the "Published Events" tab and select the "Show all events" option
- double-click on the "Validate ProductID property" event and set a false condition for it (e.g. 1=2)
- double-click on the "Execute custom action" event and set its condition to "1"
- in the "Table Editor" page select the "InstallExecuteSequence" table and set a false condition for the "ValidateProductID" row (e.g. 1=2)
- build and test your project

If you encounter other problems, just let me know.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Hi Eusebiu,

It didn't work. I did exactly what you mentioned. It still asked me to input text follow the template <###-###>
SerialValidation.png
SerialValidation.png (44.04 KiB) Viewed 13378 times
Result:
SerialValidationFail.png
SerialValidationFail.png (8.63 KiB) Viewed 13378 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

Hi,

Indeed, there were some additional steps that I forgot to mention. Please find them in my previous post and let me know if they work.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Hi Eusebiu,

It's work! Thank you very much!
Last edited by blackpanda on Wed Apr 10, 2019 11:33 am, edited 2 times in total.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

You're welcome. I'm glad it worked.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Now, if the serial number is incorrect, it does not show mesage like Invalid Serial Number or something like that but finish the installation with fault and impossible to go back.
SNFinished.png
SNFinished.png (6.75 KiB) Viewed 13336 times
Last edited by blackpanda on Thu Apr 11, 2019 12:03 pm, edited 1 time in total.
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Hi Eusebiu,
When I clicked Install button it showed message Invalid Serial Number and finish the installation. I have no idea why this message was showed there, I assumed that it's only showed in RegistrationDlg.
snInstall.png
snInstall.png (9.56 KiB) Viewed 13315 times

Could you please take a look?

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

Hi,

Are you sure that you carefully implemented all the steps I mentioned in the post above? The "invalid serial number" message is displayed during the installation if the step below is skipped:
- in the "Table Editor" page select the "InstallExecuteSequence" table and set a false condition for the "ValidateProductID" row (e.g. 1=2)

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Hi Eusebiu,
It's already set like photo below
snfail.png
snfail.png (74.14 KiB) Viewed 13301 times
Is it correct?

This is what I got from the log file
Action 13:34:44: FindRelatedProducts. Searching for related applications
Action start 13:34:44: FindRelatedProducts.
MSI (s) (20:90) [13:34:44:291]: Skipping FindRelatedProducts action: already done on client side
Action ended 13:34:44: FindRelatedProducts. Return value 0.
MSI (s) (20:90) [13:34:44:291]: Skipping action: AI_DOWNGRADE (condition is false)
MSI (s) (20:90) [13:34:44:291]: Doing action: LaunchConditions
Action 13:34:44: LaunchConditions. Evaluating launch conditions
Action start 13:34:44: LaunchConditions.
Action ended 13:34:44: LaunchConditions. Return value 1.
MSI (s) (20:90) [13:34:44:291]: Skipping action: ValidateProductID (condition is false)
MSI (s) (20:90) [13:34:44:291]: Skipping action: AI_VALID_SERIAL (condition is false)
MSI (s) (20:90) [13:34:44:291]: Doing action: AI_EXIT_ACTION
Action 13:34:44: AI_EXIT_ACTION.
Action start 13:34:44: AI_EXIT_ACTION.
Invalid serial number.
MSI (s) (20:90) [13:34:46:432]: Product: CSAT -- Invalid serial number.
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

Could you guy please take a look on it?

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Serial Validation template

Hi,

Indeed, the error appears because another custom action checks the serial number during the installation. In order to avoid it, you need to add two "Set installer Property" custom action on the "Install Execution Stage" above the "Searches" action group as follows:
  • Property: SERIAL_VALIDATION
    Value: TRUE
    Condition: UILevel = 5
  • Property: ProductID
    Value: PIDKEY
Let me know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Re: Serial Validation template

It works!!!!
Thank you very much!

Return to “Building Installers”