cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MarcelS
Level 2

Multiple instance & .NET installer deinstallation problem

I 've written a Windows service in .NET.
To install this service it needs installUtill.exe to be executed.

Created an Installshield Basic MSI project.
Added properties SERVICE_NAME and SERVICE_DISPLAY_NAME, which are used on the components .NET settings in the .NET installer class.

Added an extra instance in the installer release configuration, so the service can be installed twice (to enable clustering...)
In this instance the properties SERVICE_NAME, SERVICE_DISPLAY_NAME ProductCode and ProductName are set to new defaults.

Installation of both instaces works perfect.
Uninstal of the extra instance doesn't execute the .NET installer custom actions
Uninstal of the first instance works OK.

Attached you find the log files from deinstalling both instances.
Search for "/ServiceName=" which is passed to installUtil.exe to override the servicename for the .NET service installer.

Is this a bug in Installshield 2010 sp1 or is there a workaround?
Labels (1)
0 Kudos
(6) Replies
Mescalero
Level 7

I'm encountering the same problem...
0 Kudos
ccRubens
Level 5

Hello,

I´m trying do something similiar, but facing the same problem, have u guys find a way to solve this?¿

Tnks in advance
0 Kudos
Christopher_Pai
Level 16

MarcelS wrote:
I 've written a Windows service in .NET.
To install this service it needs installUtill.exe to be executed.


No it doesn't.

http://blog.deploymentengineering.com/2006/07/msi-vs-net.html

Take your EXE, make it the keyfile of it's own component and drill down to advanced | services and just declare your service and it's events. You don't need custom actions. Further, if you want each instance to have it's own service that's no problem either because the ServiceInstall table's Name column is of type formatted. You can use properties to transform the service for each instance.
0 Kudos
MarcelS
Level 2

If your exe is just a plain service it doesn't, just as Christopher describes.
But if it depends on other .NET installer classes (like ours also includes a WMI provider) you want the custom action.

We worked around the problem by including the service and dependencies twice in the project. Then through propertie settings let the isntaller only installing one file for one instance. Then the custom_actions are executed as expected.
0 Kudos
ccRubens
Level 5

Hi,

Be trial and error i was correcting the problem, but what i have now htis: 2 instances of the same service (no files duplicates), it works fine for the install and uninstall for 1 instance, but when install 2 instances and try to remove them, in the Service control panel(Services.msc) the first one remain, (the folders are deleted, and the reference in "add/remove programs" are removed), i have see this problem in other post, but no one says if is product problem o developer problem, can u tell wich is it?¿, and what should do.

Many Tanks.
0 Kudos
Christopher_Pai
Level 16

MarcelS wrote:
If your exe is just a plain service it doesn't, just as Christopher describes.
But if it depends on other .NET installer classes (like ours also includes a WMI provider) you want the custom action.

We worked around the problem by including the service and dependencies twice in the project. Then through propertie settings let the isntaller only installing one file for one instance. Then the custom_actions are executed as expected.


You shouldn't use an Installer class for the WMI provider either. Install Util is evil. I'm serious. I've never studied how to deploy a WMI provider but if it really can't be done using native MSI and you must have a custom action, you want to use WiX DTF. Schedule the custom action to run prior to StartServices so that you can still use standard MSI to create and start the service.
0 Kudos