Reputation: 619
I'm using the Visual Studio Installer Projects Extension to create a .msi for my project.
The installer seems to work ok for the most part, but it won't kick off my service after install and I have to run MyService.exe manually.
Is there a way to do this? Or could I inject some custom installer code somewhere?
Upvotes: 0
Views: 1990
Reputation: 55591
Viusal Studio Installer projects don't expose Windows Installer's underlying ServiceInstall / ServiceControl tables. This forces developers to reinvent the wheel using custom actions resulting in fragile installers.
Windows Installer XML can author merge modules that properly implement ServiceInstall / Service Control. You can then reference that merge module into your Visual Studio Installer to accomplish the task with breaking best practices. A discussion of this can be found here:
Augmenting InstallShield using Windows Installer XML - Windows Services
Redemption of Visual Studio Deployment Projects
IsWiX Tutorials - How to author a Windows Service using WiX / IsWiX
Upvotes: 1
Reputation: 20780
See if this helps:
http://www.installsite.org/pages/en/msi/tips.htm
Scroll down to Installing Services with Visual Studio.
It's a tool for adding the ServiceInstall/ServiceControl features to a VS setup. I haven't updated it for a while but all the source is there.
Upvotes: 0
Reputation: 531
Microsoft has described the process of creating a service installer in this MSDN article: How to: Add Installers to Your Service Application
Upvotes: 0