470,849 Members | 1,645 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

How to set .Net service dependencies

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
May 16 '06 #1
1 5299
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
May 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Alan Pretre | last post: by
3 posts views Thread by mailme.faisal | last post: by
3 posts views Thread by Jeremy S. | last post: by
29 posts views Thread by Ken Allen | last post: by
3 posts views Thread by adasilva | last post: by
3 posts views Thread by Manuel Alves | last post: by
8 posts views Thread by DF Dev | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.