Multiple custom action "StopProcess" problem - Advanced Installer Community
rethdakair
Posts: 1
Joined: Wed Aug 07, 2013 6:50 pm

Multiple custom action "StopProcess" problem

I'm trying to stop two processes from running before uninstallation.
But, only the second is stopped.
In the log, I see that customactiondata is set, then overwritten. Then both actions are performed using only last value (StopAgent and StopMonitor).
I need to kill Monitor and Agent before the uninstall take place, so that the dialog doesn't appear (saying that some processes need to be closed).

I'm using version 10.3 build 51779
Below is the log

Code: Select all

MSI (c) (C4:64) [13:41:13:454]: PROPERTY CHANGE: Adding CustomActionData property. Its value is 'Excellium.Workstation.Monitor.exe'.
Action ended 13:41:13: AI_DATA_SETTER_6. Return value 1.
MSI (c) (C4:64) [13:41:13:454]: Doing action: AI_DATA_SETTER_3
Action 13:41:13: AI_DATA_SETTER_3. 
Action start 13:41:13: AI_DATA_SETTER_3.
MSI (c) (C4:64) [13:41:13:454]: PROPERTY CHANGE: Modifying CustomActionData property. Its current value is 'Excellium.Workstation.Monitor.exe'. Its new value: 'Excellium.Workstation.Agent.exe'.
Action ended 13:41:13: AI_DATA_SETTER_3. Return value 1.
MSI (c) (C4:64) [13:41:13:454]: Doing action: StopAgent
Action 13:41:13: StopAgent. 
Action start 13:41:13: StopAgent.
MSI (c) (C4:B8) [13:41:13:482]: Invoking remote custom action. DLL: C:\Users\mmorneau\AppData\Local\Temp\MSI3EA3.tmp, Entrypoint: StopProcess
Action ended 13:41:13: StopAgent. Return value 1.
MSI (c) (C4:64) [13:41:13:492]: Doing action: StopMonitor
Action 13:41:13: StopMonitor. 
Action start 13:41:13: StopMonitor.
MSI (c) (C4:44) [13:41:13:520]: Invoking remote custom action. DLL: C:\Users\mmorneau\AppData\Local\Temp\MSI3EC4.tmp, Entrypoint: StopProcess
Action ended 13:41:13: StopMonitor. Return value 1.
MSI (c) (C4:64) [13:41:13:529]: Doing action: ExecuteAction
Action 13:41:13: ExecuteAction. 
Action start 13:41:13: ExecuteAction.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Multiple custom action "StopProcess" problem

Hello and welcome to Advanced Installer forums,

To execute the custom actions at the beginning of uninstall you'll need to schedule them before "Searches" action group. Also the execution stage condition should only have the "Uninstall" option selected.

CustomActionData property usage is described in the Custom Action Properties article and in the How to add a custom action that modifies the system and accesses Installer Properties? FAQ.

However, these are only the big lines and I can't be sure why the second custom action won't run until I can see you project settings. Can you please send us the project file (.AIP) and the entire verbose log of the uninstallation to support at advancedinstaller dot com so we can investigate?

Maybe the How do I detect or stop a process? article will also help.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”