views:

53

answers:

2

I have a MSI install built with InstallShield 2009 which installs a .NET service by setting the ".NET Installer Class" to Yes on the component which contains the service exe. This base install which contains files and the exe installs OK. I created a small update MSP which is updating the service exe file in the original install. When I run the MSP on a system that contains the base install I get error 1001 because it is trying to reinstall the service during the small update MSP install.

Flexera's official response to this problem is that if the .NET executable needs to be updated, then one should set the component ".NET Installer Class" to No and create their own Custom Actions. Flexera also admitted that they do not document anywhere that if you set the ".NET Installer Class" to Yes that you cannot then create MSP updates of your install. It is impossible to go back and and change the base install since it has been released and the update needs to be created against it. I have on my own come up with a workaround by including a custom action in the MSP update which uninstalls the service during the install of the MSP. This gets the small update MSP installed but this workaround does not work for uninstalling the MSP from ARP.

I need to know the best way to address this issue in future installs. How do you install a .NET service in such a way where you can easily update the service later using a small update MSP?

A: 

The best way would be to use MS BITS (Microsoft's Background Intelligent Transfer Service) which is similar to Windows Update.

Of course your main app has to have the bility to use this service so I'm not sure if this answer will work in your scenario unless you uninstall the current app and re-install a new version with BITS support.

For more information on BITS and using it in .NET

http://msdn.microsoft.com/en-us/library/aa362708(VS.85).aspx
http://msdn.microsoft.com/en-us/magazine/cc188766.aspx
http://www.codeproject.com/KB/IP/sharpBITS.aspx
del.ave
A: 

Services should be installed using the MSI way; as intaller classes are horribly fragile, but self-written custom actions aren't likely to be a lot better (just easier to control). You can find the Service options under the component advanced settings.

Michael Urman
I thought these options ("Control NT Services" and "Install NT Services") only worked for NT services. I have used these options successfully for installing NT services in the past. I am trying to install a .NET service. Do these options work for a .NET service?
Linda
There are .NET services out there for which this won't work (generally when their installer class sets up unrelated dependencies), but outside of that case it should work fine. Phil Wilson's post (#6 on the second page of http://community.flexerasoftware.com/showthread.php?t=139667 ) confirms this.
Michael Urman

related questions