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. How to displaying User Options in a Windows Service

How to displaying User Options in a Windows Service

Scheduled Pinned Locked Moved C#
tutorial
2 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.
  • J Offline
    J Offline
    john ingram
    wrote on last edited by
    #1

    How do you display User Options in a Windows Service. I know you can stop/start/pause/restart a service. The is a way to add options to start a windows service. Is there anyway to display these options with out starting the service. John Ingram

    H 1 Reply Last reply
    0
    • J john ingram

      How do you display User Options in a Windows Service. I know you can stop/start/pause/restart a service. The is a way to add options to start a windows service. Is there anyway to display these options with out starting the service. John Ingram

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      As you said, you can provide command line arguments in the Services control panel / snap-in. If you need to configure the options in a different way, you could use a Windows Forms application that either uses registry settings or writes on a .config file (or other configuration file) for the service. You can use the ServiceController class to start, stop, or pause the service programmatically then. If you want to configure the options while the service is running, you need to use the ServiceController.ExecuteCommand to pass a command identifier. If you need to change more complex options, you can use .NET Remoting over a TCP or HTTP channel.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      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