Basic_Coder
Posts: 12
Joined: Tue Jun 16, 2020 8:27 pm

Updating Service Logon Password After User Changes Their Windows Logon Password

Tue Jul 20, 2021 6:22 pm

Hi Advanced Installer Team,

Love the product.

I am hoping for some guidance on the use of windows services, specifically services requiring user credentials, and more specifically what to do after a user changes their password.

Environment: Advanced Installer version 15.8, Enterprise edition.

My installer has a LogonInformationDlg to collect the user's domain, username, and password. It successfully creates and starts the service on the user's machine with credentials [DOMAIN_NAME]\[USER_NAME] and [USER_PASSWORD].

My trouble is, the user has changed their password from time to time, and doing so will no longer allow the service to log on. I want to avoid telling them to manually change the services password each time they change their password, though I know that this is an option. Steps would be to use start menu > search for and open Services > find their service > right click > Properties > Log On tab > change the password.

I would like to use Advanced Installer to update their password instead. I have figured out that I could just tell the user to uninstall / reinstall the program, but it feels like this is not the best user experience, and I am therefore hoping to find a better solution.

Do you know a better user experience to update the user's password?

What I have tried... I thought that a better user experience would be to ask the user to run the installer's Maintenance > Modify (on the Modify/Repair/Remove screen). So I put a duplicated LogonInformationDlg into the Maintenance sequence under the Dialogs tab of Advanced Installer. But this would require deleting / recreating the service with the new password during Maintenance. Looking through the Services tab of Advanced Installer https://www.advancedinstaller.com/user- ... vices.html , I did not see a way to do this. Thus, even if I have the LogonInformationDlg in Maintenance sequence, information on that screen will not affect the service in any way.

It seems the only way to update the service's password, without the user having to go through the uninstall wizard first, would be to force every new install (even with the same version of installer) to go to the First Install sequence, where they can put in their password and create / start the service. I could do this by unchecking the box "Register product with Windows Installer" in the Product Details tab of Advanced Installer. This would not be a good option for me, because that would not ever allow the user to uninstall my program.

Would you know of a better solution?

Thank you for you time,
Henry

Basic_Coder
Posts: 12
Joined: Tue Jun 16, 2020 8:27 pm

Re: Updating Service Logon Password After User Changes Their Windows Logon Password

Thu Jul 22, 2021 5:44 pm

I apologize for not seeing this earlier, but viewtopic.php?t=1512 might be exactly what I need. Forces reinstall of the service on Modify. I'll probably have time to explore this option in the next two weeks, and update this forum with my findings.

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

Re: Updating Service Logon Password After User Changes Their Windows Logon Password

Thu Jul 22, 2021 6:01 pm

Hello,

First of all, thank you very much for your kind words! :)

I am really glad to see that you are enjoying our product!

Regarding your issue here, you have pretty much exposed all the solutions. If Advanced Installer is to be involved in this, we have few options:

- if the user manually uninstalls and reinstalls the product

- if you create an updated package (e.g. from version 1.0.0 to 1.0.1). This will automatically uninstall the older version and then install the newer version

- or the one solution you found as being the best, to reinstall the feature during the "Modify"

Regarding the thread you have found, although the implementation of that is not really hard, please note that a much easier method is now available.

Nowadays, based on our user's feedback, we have created a special event that does just that. So, instead of a custom action, you could simply add the event as in the attached screenshot below:
ReinstallOneOrMoreFeatures.png
ReinstallOneOrMoreFeatures.png (170.78KiB)Viewed 4851 times


That "CustomizeDlg" dialog is only displayed if, in the previous "MaintenanceTypeDlg" dialog, the user has selected "Modify". This should ensure that the event is only triggered during a "Modify".

Please let me know if I can further be of any assistance and I will gladly do so!

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

Return to “Common Problems”