Hello Silvio,
Basically, an upgrade process means the uninstall of the older version and the install of the newer version.
With that being said:
1. when installing a new version (still running the setup), I expect the user and the service are there so I would like to just stop the service (and not unistall it) and leave that user (not removing it and create it again).
This means that we should not delete the service during an uninstall. To do so, you can go to
"Services" page --> control operations --> uncheck the
"Delete" option from the
"On uninstall" action, leaving only the
"Stop" option checked.
Additionally, you should also make the executable of your service permanent, so the setup does not delete it. For more information about this, please have a look over the
"How do I prevent a file or registry entry from being uninstalled or repaired?" article which I think you may find useful.
However, please keep in mind that by doing this, this basically means that your service should never change (e.g. its functionality will always stay the same).
The deletion of the user created by the install also happens during the uninstall of the older version. To stop that from happening, you should condition the execution of the action that deletes the user. However, please keep in mind that this should be done in the older package. To do so, you can go to
"Table Editor" page -->
"InstallExecuteSequence" table -->
"AI_UninstallAccounts" action add the following condition to that:
The UPGRADINGPRODUCTCODE is a property which is set in the package that is being uninstalled by an upgrade (your older package).
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging