cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tipsybroom
Level 3

execute application during uninstall

Hello community,

I want to create a custom action that executes an executable, which is installed with the MSI package, during uninstallation.

I want first execute the custom action and then deleting the files installutil.exe and myService.exe. The problem is, that I can't do it via components -> services

I created one, but it doesn't work:

Executable Filekey: installutil.exe
Command Line: /u myService.exe
Return Processing: Synchronous (check exit code)
in-script execution: immediate execution
execution scheduling: always execute
use 64bit: no
install UI sequence: absent
install exec sequence: after removeduplicatefiles
install exec condition: REMOVE="ALL"
admin UI sequence: absent
admin exec sequence: absent


What am I doing wrong?

thanks in advance
Labels (1)
0 Kudos
(6) Replies
Cygnusx1
Level 8

what does the .log say? Not sure what this means: "The problem is, that I can't do it via components -> services"
0 Kudos
BobVilla
Level 6

Where do you have your CA firing in the Sequences?

Edit: Duh...I see it..sorry.
0 Kudos
BobVilla
Level 6

I have one executing on uninstall, the only differences with mine are:
Command Line: -u
In Script Execution: Deferred Execution
Install Exec Sequence: After StopServices
0 Kudos
tipsybroom
Level 3

Cygnusx1 wrote:
what does the .log say? Not sure what this means: "The problem is, that I can't do it via components -> services"


I have a component that contains the service.exe. I don't want to install the service at install. The user decides when to install the service. The service has an special name in services. When I want to delete the service with "sc.exe" I need this special name. But I don't know the special name during uninstall. This is why I did not define a service in Components.
0 Kudos
tipsybroom
Level 3

Log says:

[CODE]
MSI (s) (0C:60) [16:37:55:120]: Executing op: ActionStart(Name=ServiceUninstallDelete,,)
Action 16:37:55: ServiceUninstallDelete.
MSI (s) (0C:60) [16:37:55:120]: Executing op: CustomActionSchedule(Action=ServiceUninstallDelete,ActionType=1042,Source=C:\myservice13\InstallUtil.exe,Target=-u myService.exe,)
CustomAction ServiceUninstallDelete returned actual error code -1 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (0C:60) [16:37:55:214]: Note: 1: 1722 2: ServiceUninstallDelete 3: C:\myservice13\InstallUtil.exe 4: -u myService.exe
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action ServiceUninstallDelete, location: C:\myservice13\InstallUtil.exe, command: -u myService.exe
MSI (s) (0C:60) [16:37:56:474]: Product: myservice -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action ServiceUninstallDelete, location: C:\myservice13\InstallUtil.exe, command: -u myService.exe

Action ended 16:37:56: InstallFinalize. Return value 3.
[/CODE]
0 Kudos
tipsybroom
Level 3

I found a solution.

I had to use Command line: -u [INSTALLDIR]myService.exe

This works fine for me.
0 Kudos