How to set .Net service dependencies

  • Thread starter Thread starter Usman
  • Start date Start date
U

Usman

Hi

I've created a windows service in .Net and want it to be dependant on some
other service. Can someone please tell how to do it programatically instead
of editing the registry. Just like earlier in VC++ there was a parameter
passed to "CreateService" that would specify the service dependencies. I
didnt see any option in .Net service. Please help if there's any solution
other then writing it in registry.

Regards

Usman
 
Hello, Usman!

U> I've created a windows service in .Net and want it to be dependant on
U> some other service. Can someone please tell how to do it programatically
U> instead of editing the registry. Just like earlier in VC++ there was a
U> parameter passed to "CreateService" that would specify the service
U> dependencies. I didnt see any option in .Net service. Please help if
U> there's any solution other then writing it in registry.

How do you install your service?

If you do this via ServiceInstaller class and InstallUtil, then in the installer class there is property that will help you ( ServicesDependedOn ).

If you install service via ServiceInstall table in the MSI, then you must add values into Dependencies column.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top