Results 1 to 4 of 4

Thread: Customising settings in windows service...how to?

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Customising settings in windows service...how to?

    I have written a windows service that does a few simple tasks.
    I would like to customise some properties for this service, that can be changed at runtime at a later date.

    What's the best way to go about this?

    I am thinking that by adding a form and a systray icon to my windows service I can popup a settings form when clicking on the systray icon.
    This form would then alloow me to customize data...but where to save? Config file? Registry?
    Any best practises on this?

    Woka

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Customising settings in windows service...how to?

    Is the data going to be changed frequently? You might also want to think about how many settings you will be saving. I would personally go for a configuration file over the registry any time. The only time i really use the registry is when i am saving static data that rarely changes.

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Customising settings in windows service...how to?

    Hi...I need to set 3 settings, which should really be set when u deploy the software...I have 2 apps that use these settings, and they won't change that often, if at all, which is why I think I want to use the registry.

    Woka

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Customising settings in windows service...how to?

    A GUI interface that works with the windows service to make changes to the registry, so that you do have a centralized location.

    On the other hand, if you have full control of all three of these applications, then you can specify the config file to use in each of the config files for those applications, and so I would then say, use a central config file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width