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. C#
  4. .NET Windows Service Installer

.NET Windows Service Installer

Scheduled Pinned Locked Moved C#
csharptutorialquestion
5 Posts 3 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.
  • T Offline
    T Offline
    TigerNinja_
    wrote on last edited by
    #1

    Does anyone know how to actually 'start' a windows service as part of the install (.msi)? I have a windows service and created an installer for it and it installs fine, but it would be really great if the installer could just start the service after installation complete. Thanks.

    R.Bischoff

    Tengas un buen dia

    D P 2 Replies Last reply
    0
    • T TigerNinja_

      Does anyone know how to actually 'start' a windows service as part of the install (.msi)? I have a windows service and created an installer for it and it installs fine, but it would be really great if the installer could just start the service after installation complete. Thanks.

      R.Bischoff

      Tengas un buen dia

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      I haven't done that in quite a long time. IIRC, you had to override the Commit method in your installer class and use the ServiceController class to start the service. Sorry, I don't have an example. It's been about 5 years since I had to do that.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      T 1 Reply Last reply
      0
      • T TigerNinja_

        Does anyone know how to actually 'start' a windows service as part of the install (.msi)? I have a windows service and created an installer for it and it installs fine, but it would be really great if the installer could just start the service after installation complete. Thanks.

        R.Bischoff

        Tengas un buen dia

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        Sure, require a reboot. :-D

        T 1 Reply Last reply
        0
        • D Dave Kreskowiak

          I haven't done that in quite a long time. IIRC, you had to override the Commit method in your installer class and use the ServiceController class to start the service. Sorry, I don't have an example. It's been about 5 years since I had to do that.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          T Offline
          T Offline
          TigerNinja_
          wrote on last edited by
          #4

          That's close to what I thought I had to do, but wasn't sure. I thought I had to do that via 'Custom Action', but I'll try to just add it in the installer first. Thanks.

          R.Bischoff

          Tengas un buen dia

          1 Reply Last reply
          0
          • P PIEBALDconsult

            Sure, require a reboot. :-D

            T Offline
            T Offline
            TigerNinja_
            wrote on last edited by
            #5

            Obviously, right :) Well, sometimes people don't want a server being rebooted, so thats not an option.

            R.Bischoff

            Tengas un buen dia

            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