We have a .Net application that uses the .Net installer class to create a Windows service. This actually works great, however, once the service is installed, I want to be able to start it.
I have tried to use the Control NT Services to do this, but this seems to occur out of sequence. I have tried to move the StartServices sequence to just before InstallFinalize in the Execute Sequence (about as late as it can go), and the install still tries to start the service before it is installed.
Does anyone have any suggestions on how to start a service that is installed this way?
BTW, I am using a Basic MSI project written in DevStudio 9.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
.Net Installer Class to Install a Service
Started by
Jamie
, Jan 13 2004 23:05
3 replies to this topic
Posted 14 January 2004 - 09:22
I believe that's because .net actions are executed very late in the install process. Why don't you use the ServiceInstall table to create the service, and the ServiceControl table to start it? (In DevStudio you would probably want to do this in the Servcies view instead of the raw tables)
Stefan Krüger
InstallSite.org twitter facebook
Posted 14 January 2004 - 17:05
Thanks for the quick responce!
I was afraid that would be that answer. The reason we don't use the ServiceInstall table is because the Installer class performs multiple functions, creating the service as well as adding some performance monitors.
I have always used NT Services in the past to create our services (IS 5.5), but our developers have started to add more and more functionality to the service installs to create new functionality (performance monitors, dynamic registry keys, etc), now requiring the installer class (.Net Services) or a commandline (non .Net) to install the services.
Jamie
I was afraid that would be that answer. The reason we don't use the ServiceInstall table is because the Installer class performs multiple functions, creating the service as well as adding some performance monitors.
I have always used NT Services in the past to create our services (IS 5.5), but our developers have started to add more and more functionality to the service installs to create new functionality (performance monitors, dynamic registry keys, etc), now requiring the installer class (.Net Services) or a commandline (non .Net) to install the services.
Jamie
Posted 14 January 2004 - 20:28
In this case you may be able to start the service using a custom action, near the end of your install.
Stefan Krüger
InstallSite.org twitter facebook