Serial Number Is Blank During An Update Installation

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

Serial Number Is Blank During An Update Installation

Postby rehook » Thu Sep 02, 2010 5:32 am

Version: Professional
Licensing: Serial Validation

I'm having some trouble with the following scenario...

During the first install, the user enters the serial number and finishes the software install. (Works just fine)

When a new version update is downloaded and installed, the serial number field is blank. (Requiring the user to enter it in again)

How can i make the serial number (that is stored in a Registry Value) appear automatically.
It would be even better if it could be shown and "disabled" so there is not a chance of it being changed.

This way, the user can just proceed with the update and not have to dig out their old serial number.

Any help is much appreciated.

Thanks
rehook
 
Posts: 8
Joined: Thu Sep 02, 2010 5:21 am

Re: Serial Number Is Blank During An Update Installation

Postby GabrielBarbu » Thu Sep 02, 2010 12:42 pm

Hello,

The PIDKEY property stores the serial number. You can set it so the field contains it too.
You can do a registry search to retrieve the serial number from the registry, then use a Property Set with Formatted custom action to set the PIDKEY property to the result.
In the Dialog Editor (in an Enterprise project), on the UserRegistrationDlg select the existing masked edit in which the user places the serial number.
On it, create a new control condition that will disable the control if the PIDKEY was already found in the registry.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GabrielBarbu
 
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am

Re: Serial Number Is Blank During An Update Installation

Postby rehook » Thu Sep 02, 2010 5:08 pm

Gabriel,

I've managed to get the "Custom Behavior > Search" To work for the Registry Key

I've set a new search to include
[PIDKEY_PROPERTY] ... HKEY_LOCAL_MACHINE.....etc. etc.
And the result when I run a test returns the desired result.

I am however having trouble getting that value set in the Custom Actions section.

I've tried it in various places in the [InstallUIISequence] section (using message boxes to test the returned value) with no results
I've also tried it under the [InstallExecuteSequence] section (using ValidateProductID & RegisterProduct) without success

Using
New Custom Action > Property Set with Formatted...
PropertyName: PIDKEY
Formatted Text: [PIDKEY_PROPERTY]

All Radio buttons left as default selection
Execution Condition: Left blank (default)


I'm assuming once the value is properly set/retrieved that the Serial Number textbox will be auto-filled with the value from the SEARCH [PIDKEY_PROPERTY]


Thank you for your help
rehook
 
Posts: 8
Joined: Thu Sep 02, 2010 5:21 am

Re: Serial Number Is Blank During An Update Installation

Postby GabrielBarbu » Fri Sep 03, 2010 8:18 am

Hello,

Please make sure you placed the Property set with Formatted custom action after AppSearch standard action under the InstallUISequence. If you placed it before AppSearch, the searches were not yet executed thus the [PIDKEY_PROPERTY] would have been empty.
Make sure you share-drag the custom action under InstallExecuteSequence also, to cover the case where the installation is silent (with no UI)

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GabrielBarbu
 
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am

Re: Serial Number Is Blank During An Update Installation

Postby rehook » Fri Sep 03, 2010 3:44 pm

That worked perfectly, Thank you!
rehook
 
Posts: 8
Joined: Thu Sep 02, 2010 5:21 am


Return to Common Problems

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron