Hi monks -

After searching for some time for a working (with my version of perl) version of this I got a version of Win32::Daemon from here (I can't remember how I found the link) :

http://www.bribes.org/perl/ppm/Win32-Daemon-20131206-PPM518.tar.gz .

I can create / start a service using the 'LocalSystem' account, by omitting the user and password as per the examples. But I can't get it to work with a user and password supplied.

I believe, perhaps wrongly, that the example provided is wrong. It says :

my %service_info = ( machine => '', name => 'PerlTest', display => 'Oh my GOD, Perl is a service!', path => $ServicePath, user => '', pwd => '', description => 'Some text description of this service', parameters => $ServiceParams );
I think that the key "pwd" should be "password". In Daemon.pm there is the code
=item C<password> The password to be used to log in the service; this is technically optional, but needs to be specified if C<user> is.

and in the documentation, "password" is discussed rather than the "pwd" used in the example. I don't have the skill to grok more than about 40% of Daemon.pm, though.

Unfortunately for me it doesn't still does't work using "password", so I'm using both keys at the moment while I try to troubleshoot what I think is an unrelated issue.

I have memories going through this on someone else's code in a previous job several years ago for several days before resolving the issue by changing to "password", so I'm hoping that someone here with the knowledge might be able to deny or confirm my suspicions there, and that if I am right, this question might save someone else some time at a later date.

Thanks!


In reply to Win32::Daemon, local machine account, password by Tharg

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.