Actually it's not. MSI has built-in support for installing services and
starting and stopping them and related services. The ServiceInstall and
ServiceControl tables have been around for years. For some inexplicable (to
me) Visual Studio setup projects want to run code in ServiceInstaller
classes instead of just putting entries in those tables. This code is not
called directly - there's a shim Dll (InstallUtilLib) between the setup and
the installer class calls, so there's plenty of scope for obscure errors.
All the products that ever installed services with MSI used the Service
tables in the MSI file, then Visual Studio comes along and invents managed
custom action code to do something that was already there for free. Note
that it does not integrate with any other related products because things
installed with user code are not reference counted in MSI. My favorite setup
whine.
http://www.installsite.org/pages/en/msifaq/a/1044.htm
http://blogs.msdn.com/astebner/archive/2005/03/10/392280.aspx
--
Phil Wilson [MVP Windows Installer]
----
Post by Michael NemtsevHello Vadym,
Yep, but it's a bit out of the self intalling way
MN>> Use ServiceInstaller class for this. See MSDN for more info
MN>> VS> Another way, without ServiceInstall, is to add values into
VS> ServiceInstall table in the msi file.
VS> VS> To modify contents of .MSI file you can use Orca tool...
VS> VS> If you use WiX then this will look like
VS> VS> <ServiceInstall Id='ServiceExeFile'
VS> Name="[SERVICENAME]"
VS> DisplayName="[PRODUCTFAMILY]"
VS> Account="[SERVICE_LOGIN]"
VS> Password="[SERVICE_PASSWORD]"
VS> ErrorControl='normal' Start='auto'
VS> Type='ownProcess' Vital='yes'
VS> Description="Runs Flowfinity services. If this service
VS> is stopped, all Flowfinity-dependent applications will be
VS> unavailable." />
VS> <!-- Starts service -->
VS> <ServiceControl Id='ServiceExeFile' Name="[SERVICENAME]"
VS> Start="install" Stop="uninstall" Remove="both"
VS> Wait="yes" />
VS> --
VS> Regards, Vadym Stetsyak
VS> www: http://vadmyst.blogspot.com
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche