Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Windows Service Dependencies

Windows Service Dependencies

Scheduled Pinned Locked Moved Visual Basic
csharpwcfwindows-admintools
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matt Philmon
    wrote on last edited by
    #1

    Is there a way to either set a Windows Service (I'm not talking Web Services here) dependencies through code or through the installui utility? Once my VB.NET service is setup using the command line utility installui.exe, since I have the "Installer" class included in my project with all the options like Type (Automatic, Manual, Disabled), everything behaves like I want... except I see no easy way to set Service dependencies. The "hacked" way of doing it appears to be going to: HKLM\System\CurrentControlSet\Services\YourServiceName\ and adding a key called DependOnService of type REG_MULTI_SZ and then include the service name(s) you are dependent on. This does appear to work well... except there's got to be a better way than having to manually enter this stuff into the registry. Anyone?

    M 1 Reply Last reply
    0
    • M Matt Philmon

      Is there a way to either set a Windows Service (I'm not talking Web Services here) dependencies through code or through the installui utility? Once my VB.NET service is setup using the command line utility installui.exe, since I have the "Installer" class included in my project with all the options like Type (Automatic, Manual, Disabled), everything behaves like I want... except I see no easy way to set Service dependencies. The "hacked" way of doing it appears to be going to: HKLM\System\CurrentControlSet\Services\YourServiceName\ and adding a key called DependOnService of type REG_MULTI_SZ and then include the service name(s) you are dependent on. This does appear to work well... except there's got to be a better way than having to manually enter this stuff into the registry. Anyone?

      M Offline
      M Offline
      Michael Combs
      wrote on last edited by
      #2

      You need a service installer in your project. Go to the Design view of your service and right-click in the designer and select 'add installer'. This will add a file called ProjectInstaller.vb which has a ServiceProcessInstaller and ServiceInstaller class. The property window of the ServiceInstaller class will let you add other service dependencies. Search the MSDN for an article entitled: Walkthrough: Creating a Windows Service Application in the Component Designer It gives all of the details.

      M 1 Reply Last reply
      0
      • M Michael Combs

        You need a service installer in your project. Go to the Design view of your service and right-click in the designer and select 'add installer'. This will add a file called ProjectInstaller.vb which has a ServiceProcessInstaller and ServiceInstaller class. The property window of the ServiceInstaller class will let you add other service dependencies. Search the MSDN for an article entitled: Walkthrough: Creating a Windows Service Application in the Component Designer It gives all of the details.

        M Offline
        M Offline
        Matt Philmon
        wrote on last edited by
        #3

        Thanks for your reply... been meaning to say that. I had the installer and just missed it somehow. DUH Anyway, your reply made me look again and there it is. Thanks alot.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups