well, using the "registry", and ini file, or the "Start Parameters" is going to be an adventure for me as I have no idea how to go about using these to replicate what I was doing in a normal script.

I started off with all the config params (about 40 of them -- some more stable than the others -- that is, some with more predictable values, while others that might need to be changed relatively frequently by the users of the program).

Then I migrated the config params to a conf file that I read in with my own home grown method.

Then I converted to using Config::Simple that brings in the params in a nice hash.

Now, I am converting my script to an exe and that to a service. Afaiunderstand, everything in a service has to be hard- and long- coded because the service is running as a Local System account and needs to know exactly where to find what. That, and fact that I don't understand when exactly does the service read in the config params -- at the time that it is installed, or at the time that it is started -- creates problems.

I would like the administrator of the service to be able to stop the service, change a param or two in some place convenient such as an external conf file, and restart the service with the new values. What how?

Thanks to everyone.


In reply to Re^5: Perl script to EXE to Windows Service by punkish
in thread Perl script to EXE to Windows Service by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.