I'm trying to rename a Windows service associated with a product in between versions.
Let's say in version 1 the service is called "MyService" and display name is "My Service".
Now in version 2 I'd like the service name to be "MyAwesomeService" and display name "My Awesome service".
Nothing else changes, maybe a few new files in the APPDIR and of course, the version. I also automatically generate a new product code and allow "upgrade" to the same version (to avoid getting errors that the same or never version is installed when I include this product in a larger product package).
I had no problems with this approach until I started using service failure actions. For a reason I don't understand and don't get explained in the verbose log (see below) it always fails unless I uninstall the old version and install the new one. Am I even allowed to change the service name like this or do I have to do some custom stuff to account for the old name and the new name? Some kind of a change script in the installer? I'm using the latest AI btw.
MSI (s) (24:18) [12:55:29:563]: Executing op: ActionStart(Name=AI_ConfigFailActions,Description=Configure service failure actions,Template=Service: [1])
MSI (s) (24:18) [12:55:29:565]: Executing op: CustomActionSchedule(Action=AI_ConfigFailActions,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (24:AC) [12:55:29:571]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI1A8D.tmp, Entrypoint: ConfigureServFailActions
CustomAction AI_ConfigFailActions returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (24:18) [12:55:29:656]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (24:18) [12:55:29:657]: User policy value 'DisableRollback' is 0
MSI (s) (24:18) [12:55:29:657]: Machine policy value 'DisableRollback' is 0
Action ended 12:55:29: InstallExecute. Return value 3.