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!

ojanacek
Posts: 11
Joined: Fri Jul 28, 2017 2:29 pm

AI_ConfigFailActions struggle

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.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: AI_ConfigFailActions struggle

Hello,
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?
The "Service Name" and "Service Display Name" fields are placed there for exactly this reason - renaming your service, therefore I'd say there is no problem with doing so.

I have tested this, but unfortunately I was not able to reproduce the described behavior.

I have tested three scenarios here:

first:

- install myservice.exe without any failure operation
- rename the service to myservicetwo.exe without any failure operation
- increase the version
- run the setup

second:

- install myservice.exe without any failure operation
- rename the service to myservicetwo.exe + adding the failure operation
- increase the version
- run the setup

third:

- install myservice.exe + adding the failure operation
- rename the service to myservicetwo.exe --> the failure operation was changed accordingly (e.g. the service name was changed)
- increase the version
- run the setup

In all three cases, everything worked as expected.

In order for me to further investigate this behavior, could you please forward me the following resources:

- a copy of the old .AIP file (used to build the older version)

- a copy of the new .AIP file (used to build the newer version)

- a download link for the older setup

- a download link for the newer setup

by e-mail at support at advancedinstaller dot com?

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

Return to “Common Problems”