• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

Uninstall a service from within an MSI package

I will be upgrading JRE using GPO to deploy.  However, due to problems with the JavaQuickStarterService, the installation hangs waiting for user input to stop it.  One solution is to uninstall it using the ServiceControlTable in the MSI (or in my custom MST) and this is what I'm trying to achieve.

The information provided on MSDN is sparse and complicated for the non-developer, but I've had a go anyway, but still can't understand what I need to do for the "component_" part of the table entry.  This is what I have so far in the ServiceControl table:

ServiceControl:   JavaQuickStarterService
Name:   JavaQuickStarterService
Event:   0x0008
Arguments:   <null>
Wait:   <null>
Component_:   <<< What do I need to do here? >>>

Many thanks,
Steve
0
sda100
Asked:
sda100
1 Solution
 
Vadim RappCommented:
In the table Component, find the component holding the executable comprising the service; what's in the first column of that, specify in the column Component_ in ServiceControlTable .

Also look at the column Wait. If you tell it not to wait, and tell it to stop and uninstall the service by specifying event=10, then even if the service is waiting for user's input, Installer will probably proceed (but then probably will require restart).
0
 
sda100Author Commented:
Thank you - I ended up just stopping the service rather than uninstalling it, but your ideas pointed me in the right direction ;)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now