vpodans
Posts: 19
Joined: Tue Dec 27, 2011 3:03 pm

Windows Service properties during product upgrade

Wed May 05, 2021 10:22 am

My product includes a Windows Service to install with some default settings (actions, user account, etc.) when new service is installed.
Product upgrade to to version consist of "Remove previous version and install new version":
Capture.PNG
Capture.PNG (7.92 KiB) Viewed 4828 times
To my knowledge, the service will be removed upon uninstall and reinstalled again. However, administrators may use custom account and settings during application usage which I shall not overwrite upon product upgrade. Is there a way to prevent service removal/reinstall if I'm doing an upgrade? I prefer to uninstall the service only when I decide to uninstall the product completely?
®

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

Re: Windows Service properties during product upgrade

Fri May 07, 2021 6:00 pm

Hello,
To my knowledge, the service will be removed upon uninstall and reinstalled again. However, administrators may use custom account and settings during application usage which I shall not overwrite upon product upgrade.
You are indeed right, the service will be removed and reinstalled upon upgrade.
Is there a way to prevent service removal/reinstall if I'm doing an upgrade? I prefer to uninstall the service only when I decide to uninstall the product completely?
I believe the best approach here would be not deleting the service (i.e. unchecking the "Delete" option from your service's control operations). However, please note that will also affect the normal uninstall. In this case, I'd say we could have a custom action that removes the service only during uninstall.

Hope this helps!

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

vpodans
Posts: 19
Joined: Tue Dec 27, 2011 3:03 pm

Re: Windows Service properties during product upgrade

Sun May 16, 2021 2:10 pm

Thanks Catalin,
sorry for late response. Your answer confirms my concern.
I'd say we could have a custom action that removes the service only during uninstall.
but won't this action execute during upgrade and cause same effect -- service is removed and all custom settings are gone as well?
®

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

Re: Windows Service properties during product upgrade

Thu May 20, 2021 5:25 pm

Hello,

You are always welcome!
but won't this action execute during upgrade and cause same effect -- service is removed and all custom settings are gone as well?
We can condition the custom action to only be executed during a regular uninstall through the Upgrade Options:
UpgradeOptions.png
UpgradeOptions.png (22.19 KiB) Viewed 4685 times

For instance, if you want the custom action to be executed only during uninstall, you can leave only the "Uninstall" and "Regular Uninstall" options checked.

Hope this helps!

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

vpodans
Posts: 19
Joined: Tue Dec 27, 2011 3:03 pm

Re: Windows Service properties during product upgrade

Mon May 24, 2021 8:33 am

Thanks, I will take a look into this option and let you know with outcome.
®

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

Re: Windows Service properties during product upgrade

Tue May 25, 2021 3:14 pm

You are always welcome!

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

vpodans
Posts: 19
Joined: Tue Dec 27, 2011 3:03 pm

Re: Windows Service properties during product upgrade

Fri Jun 25, 2021 2:43 pm

Just a follow up. It seems this doesn't work. Even making suggested changes, installer overwrites custom settings on a service.
®

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

Re: Windows Service properties during product upgrade

Thu Jul 01, 2021 4:01 pm

Hello,

This is quite strange, indeed.

In order for me to further investigate this, could you please create a sample project that reproduces this issue and forward it to me by e-mail at support at advancedinstaller dot com? Here would be the files I need:

- the sample .AIP file

- a download link for the setup

- a test-case which I can follow in order to reproduce this (here, I am mostly interested in the custom settings I can do for your service, so I can check those before and after upgrading)

Looking forward to hearing from you!

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

Return to “Common Problems”