Upgrading a Windows Service Security Issue - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Upgrading a Windows Service Security Issue

Hi,

I am installing a Windows Service with custom credentials - on the first install the user is prompted for username, domain name and password for the account to use to start the Windows Service, the service installs no problems.

On an upgrade (as all Advanced Installer upgrades are Major upgrages) the Service is uninstalled and reinstalled however this time is installed with no credentials. For this to work it would mean that I would have to store the username, domain name and password somewhere else in the registry?

This is a big security concern.


Thanks,


Dave
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Upgrading a Windows Service Security Issue

Hi Dave,

A solution would be to use the Install new version first and then uninstall old version option in the "Upgrades" page. This way the service will not be uninstalled by an upgrade. Note the for this scenario the service control operation should stop the service during install so the installer can overwrite the service files.

Another solution would be to encrypt and backup the service information somewhere on the machine (registry, file etc.).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Upgrading a Windows Service Security Issue

Hi Cosmin - thanks for the tip.

I have tried this and got it working fine. One thing however is that even with the Upgrade First Uninstall after method set you must persist the Username and Domain name using the Registry and Search properties otherwise the upgrade sets the Service credentials to "\" i.e. a DomainName\Username where both are just blank.

Luckily if you provide a blank password Advanced Installer leaves the existing password in place.


Thanks,


Dave

Return to “Common Problems”