cancel
Showing results for 
Search instead for 
Did you mean: 
Lirantev
Flexera beginner

Installing\ Uninstalling Services issue

Hi Flexera community, how you all doin'?

I've started a new job recently and as part of my job I'm responsible of the InstallShield application(2012 - Professional Edition Service pack 1 Version 18).

I've been asked to add a new Service as part of the install process and also make sure it Log On as a specific account. I thought it will be easy enough but for some reason it isn't and after hours and hours and of trying to resolve my issue myself I decided it is time to ask the community for assistance :)

There are two issues I'm currently facing but I'll start with the weird one.

After I've defined a new Component with all the relevant dll and exe files I've set the exe file as a key and then under Organization --> Components --> Services I added a new Service and defined the Control Setting to "Install Start; Uninstall Stop; Uninstall Delete". After installing the application the Service is shown and up and running (I can also see it under the ServiceInstall Action in the log). The problem is with the uninstall, for some reason the Service isn't being Stopped or Removed. It also missing from the log (under the ActionStart StopServices and DeleteServices part). I've checked that the Component itself is not Permanent and the Remote Installation is set to Favor Local. I also checked both SerivceControl and ServiceInstall tables and they seems ok to me. 

Any idea what else I should check? what am I missing?

Thanks anlot :)

Liran.

0 Kudos
7 Replies
rguggisberg
Active participant

Re: Installing\ Uninstalling Services issue

  1. Services
  2. Select your service
  3. Events
  4. Key Name - Enter a name like 'YourServiceUninstall'
  5. Operation Time - [Uninstall Stop]
  6. Wait Type - "Wait for the event to complete"
0 Kudos
Lirantev
Flexera beginner

Re: Installing\ Uninstalling Services issue

Hi @rguggisberg Thanks for the quick replay :) this is exactly what I did and it still doesn't work (I've attached a screenshot of the service Control Settings). Thanks, Liran
0 Kudos
Lirantev
Flexera beginner

Re: Installing\ Uninstalling Services issue

I'm currently using a workaround using Custom Actions and Sequences but I'll be more than happy to use the build in way for creating, deleting and configuring services.

Thanks,

Liran.

0 Kudos
Flexera banna_k
Flexera

Re: Installing\ Uninstalling Services issue

Hi @Lirantev ,

Can you check by giving separate event for install and uninstall.

 ServiceEvents.PNG

0 Kudos
Highlighted
Lirantev
Flexera beginner

Re: Installing\ Uninstalling Services issue

Hi @banna_k ,

will try it out and update :)

One thing I found strange when trying to use the Custom Action for create\config services. It seems that at the begging of the log the InstallServices actions starts but doesn't install the services. It doesn't seems to do anything actually:

MSI (s) (10:9C) [11:12:47:129]: Doing action: InstallServices
Action 11:12:47: InstallServices. Installing new services
Action start 11:12:47: InstallServices.
InstallServices: Service:
Action ended 11:12:47: InstallServices. Return value 1.

But later on in the InstallFinalize step the Services does being installed\started\etc.:

Action 11:12:47: InstallServices. Installing new services
MSI (s) (10:9C) [11:12:47:660]: Executing op: ProgressTotal(Total=2,Type=1,ByteEquivalent=1300000)
MSI (s) (10:9C) [11:12:47:661]: Executing op: ServiceInstall(Name=MyService2,DisplayName=MyService2,ImagePath="C:\Program Files

So if I want to run sc config\delete\stop Custom Action it seems that I need to run it after the InstallFinalize step and not the InstallService one since it seems the InstallService runs before the services are even being installed.

Am I missing something? 

Thanks,

Liran.

 

0 Kudos
aweiss123
Wanderer

Re: Installing\ Uninstalling Services issue

@banna_k 

 

I'm in the same situation using InstallShield 2019 R2 Premier.  My service installs just fine but will not stop or uninstall when the uninstallation is executed. I also have the Uninstall Stop and Uninstall Delete set to Yes.  I don't see any indication in the log file that the services are being stopped or uninstalled.  

 

Thank You,

-Andy

0 Kudos
aweiss123
Wanderer

Re: Installing\ Uninstalling Services issue

SOLVED

I finally resolved my issue and I hope this helps someone else.  I had a component using a dynamic file list to load up all of my application files, including my service.exe file.  Mistakenly I created a second component just for service.exe, set it as the key file and used this in the Services area.  Because there was 2 components covering the same file, the installer would not uninstall the service.  The fix was to delete the 2nd component, and add the service.exe as a static file to the first component.  By adding this as a static file in the same component the dynamic file list ignores this file.  I then set it to the key file and used this component in services.

An unrelated issue I was having was an erroneous reboot required message that I didn't think I should have been getting.  The reason was I was shipping some font (ttf) files in a webcontent folder.  The installer was automatically registering and unregistering these fonts in Windows, which was NOT desired.  This tripped the reboot required message.  Removing the RegisterFonts and UnregisterFonts sequences solved that for me.

Good Luck all.

-andy 

0 Kudos