ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Attempting to upgrade

I have resolved some other issues that were holding me back and now im working on the updater. I know what the issue is. Though Im sure im making an error in how im trying to do it.

Upon trying to upgrade its prompts a reboot. (This is not wanted)

I can stop the service.

Upgrade

restart the service

and all is well.

So I know its an issue with my custom actions. I make a call to stop service. I have upgrade checked as well as uninstall(both options)
- I have that marked for immeditealy
- It is ran right after preparing

Also the start service didnt work either. That I have just upgrade marked off.
- I have that checked as after the system has been successfully modified.
- It is ran right before finish execution

Any ideas what my issue may be?
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

Trying to run the program and install it so I can get some log files out. The popup doesnt show up to restart the service. Going through the windows event viewer it is stopping and restarting the service properly.

Do you know why the issue would only occur on running it from the msi through GUI vs running the MSI through cmd?
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

I was able to reproduce it through AI run command with logs showing.

Code: Select all

Action ended 12:34:09: MigrateFeatureStates. Return value 0.
MSI (s) (7C:C8) [12:34:09:947]: Skipping action: SetODBCFolders (condition is false)
MSI (s) (7C:C8) [12:34:09:948]: Skipping action: AI_DATA_SETTER_3 (condition is false)
MSI (s) (7C:C8) [12:34:09:949]: Skipping action: StopServiceUpgrade (condition is false)
MSI (s) (7C:C8) [12:34:09:951]: Skipping action: AI_PREPARE_UPGRADE (condition is false)
MSI (s) (7C:C8) [12:34:09:952]: Doing action: InstallValidate
For some reason its stating the that condition for stopservice upgrade is false
DCA.aip
(55.04 KiB) Downloaded 360 times
I have upgrade and generated a new product code so that I could test upgrading. I have sent the .aip earlier I believe but here is the most recent one
Attachments
MSIf1bc7.LOG
(279.58 KiB) Downloaded 356 times
stopservice.PNG
stopservice.PNG (122.39 KiB) Viewed 20866 times
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

Code: Select all

MSI (s) (80:70) [14:06:36:208]: Doing action: StopServiceUpgrade
Action 14:06:36: StopServiceUpgrade. 
Action start 14:06:36: StopServiceUpgrade.
MSI (s) (80:5C) [14:06:36:230]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIDF61.tmp, Entrypoint: StopWinService
Action ended 14:06:36: StopServiceUpgrade. Return value 1.
I can get this by removing a condition I set to try and make sure it captured it.
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

The day is almost done here. I have been able to reproduce the issue while showing logs running the file through AI program. I did find this.

Code: Select all

MSI (s) (80:B0) [14:13:47:696]: Doing action: StopService
Action 14:13:47: StopService. 
Action start 14:13:47: StopService.
MSI (s) (80:54) [14:13:47:709]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI74E7.tmp, Entrypoint: StopWinService
Action ended 14:13:47: StopService. Return value 1.

Code: Select all

Action 14:13:47: StopServiceUpgrade. 
Action start 14:13:47: StopServiceUpgrade.
MSI (s) (80:A4) [14:13:47:842]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI7565.tmp, Entrypoint: StopWinService
Action ended 14:13:47: StopServiceUpgrade. Return value 1.
From what I can tell the service should stop. But keeping track of the service and based off what happened with the prompt its not working. Then again im assuming a return value of 1 is true and that it succeeded. But Im unsure.
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

Please keep in mind that custom actions must return a value of 0 for success. The installer interprets any other return value as failure. Also, in order to continue with the installation even the custom action returns a value other then 0, you can uncheck the “Fails installation if custom action returns an error” option from “Custom Actions” page (by default it is checked).
I find this on another thread. So I take it the value of 1 being true means that it failed.

Which would explain why I have the issue. the part I am confused about is why it fails to succeed. It works fine when just plain uninstalling. But when attempting to upgrade it gives me a serious issue.

Hoping this rambling will at least provide more insight into what is causing the issue.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Attempting to upgrade

Hello,
Please keep in mind that custom actions must return a value of 0 for success. The installer interprets any other return value as failure. Also, in order to continue with the installation even the custom action returns a value other then 0, you can uncheck the “Fails installation if custom action returns an error” option from “Custom Actions” page (by default it is checked).
I find this on another thread. So I take it the value of 1 being true means that it failed.
In the Custom Actions view from Advanced Installer you can add your own custom action that will be executed. For those custom actions that you add, this note reffers to, custom actions that are executable files must return a value of 0 for success.

If in the log appears value 0 returned by the custom action it means that the action could not be executed (e.g. its condition is false).
If in the log appears value 1 returned by the custom action it means that the action completed successfully.

For full list, please check the Logging of Action Return Values article.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

Thank you for the clarification on that.

However, what I am still confused on is why then if its returning 1. Its not actually stopping the service at all. Im watching all the services on my machine. And there isnt a time where the service actually stops.
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

I still have not heard any word back from you guys and have attempted to call during the scheduled hours. I was hoping to try and resolve these issues
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Attempting to upgrade

Well it seems I need to create a new thread to have this issue addressed. Ill do so
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Attempting to upgrade

Hello Luther,

I have addressed your issue here:

viewtopic.php?f=2&t=40704&p=109200#p109200

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

Return to “Common Problems”