bvukas
Posts: 5
Joined: Wed Nov 06, 2013 11:57 am

Display UserRegistrationDlg in Maintenance Mode

Hello,

I need to be able to allow users to modify the product serial number, without having to un-install or re-install the product. My understanding is that this can be done by displaying UserRegistrationDlg in Maintenance mode.
So far I ran into two issues:
1. I have tried adding the AI_INSTALL OR AI_MAINT condition to Licensing page, but this didn't cause UserRegistrationDlg to be displayed in maintenance mode.
2. On another demo project, I was able to create a copy of UserRegistrationDlg, and display it in Maintenance mode. However, the values entered for product key, user name and company name did not end up written to registry, even though the custom action to validate the product key was triggered.

—Bernard
Attachments
Using AI_INSTALL OR AI_MAINT condition in the Licensing page, does not show UserRegistrationDlg in maintenance mode
Using AI_INSTALL OR AI_MAINT condition in the Licensing page, does not show UserRegistrationDlg in maintenance mode
AI_INSTALL OR AI_MAINT.png (47.77 KiB) Viewed 4896 times
When in Maintenance mode, values entered in UserRegistrationDlg don't get written back to registry
When in Maintenance mode, values entered in UserRegistrationDlg don't get written back to registry
New Validation Dialog.png (91.1 KiB) Viewed 4898 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Display UserRegistrationDlg in Maintenance Mode

Hi and welcome to Advanced Installer forums.

If you added a registry value that contains the product serial number and you want to be able to modify it in Maintenance Mode, you can follow the steps below:
- go in the Dialog page
- select the MaintenanceTypeDlg from the Maintenance folder
- click on the "Modify" button
- add a published event by clicking the "New" button from the "Published Events" tab
- select "Reinstall one or more features" from the newly appeared dialog
- in the "Argument" edit box write the identifier of the feature that contains the registry value with the serial number (you can find it in the Organization page)
- click [OK], then build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvukas
Posts: 5
Joined: Wed Nov 06, 2013 11:57 am

Re: Display UserRegistrationDlg in Maintenance Mode

Eusebiu,

Thank you for the response. I have not been adding any registry values. Instead, I was using what was provided by UserRegistrationDlg.

I notice it stores information about registered user, company, and serial number under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\[identifier here]\InstallProperties

I am looking for a way for UserRegistrationDlg to be able to write any changes made during Maintenance mode, specifically as related to ProductID, RegOwner and RegCompany values.

—Bernard
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Display UserRegistrationDlg in Maintenance Mode

Hi Bernard,
I notice it stores information about registered user, company, and serial number under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\[identifier here]\InstallProperties
This information is written in the registry by a Windows Installer standard action called "PublishProduct" and it seems that the changes made in Maintenance Mode are not updated, neither the "ProductID" value.

If really you want to modify the serial number in Maintenance Mode, you can go in the Registry page and create the above path and the "ProductID" value for which you will use the [PIDKEY] property in the "Data" field. Then you can follow the steps from my previous post.

To determine the "[identifier here]" key from the registry path you can create a custom action that will compute it as described in the Packed GUID’s, Darwin Descriptors and Windows Installer Reference counting article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvukas
Posts: 5
Joined: Wed Nov 06, 2013 11:57 am

Re: Display UserRegistrationDlg in Maintenance Mode

I tried that earlier today and I couldn't get anything written to registry; no error messages either.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Display UserRegistrationDlg in Maintenance Mode

Hi Bernard,

This information is stored in the 64-bit portion of the registry, so to get it updated, you should check the "64-bit Component" flag for the related component in the Organization page. For more details you can take a look on the How do I install different registry entries based on the Operating System (32/64-bit)? article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bvukas
Posts: 5
Joined: Wed Nov 06, 2013 11:57 am

Re: Display UserRegistrationDlg in Maintenance Mode

I managed to resolve the issue by adding a custom action to write to registry by using REG.EXE. Thank you.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Display UserRegistrationDlg in Maintenance Mode

You're welcome.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”