One more running Perl as a service question

Discussion in 'Perl Misc' started by Cosmic Cruizer, Feb 13, 2004.

  1. I would think this question is more suitable for a Microsoft forum, but
    since I have not received any replies to the questions I posted there, I'm
    back here again.

    Now that I am finally successful in turning my Perl scripts into services,
    is it possible to have the service display a console window when the account
    is used to logon? If yes, what changes do I need to make to my service?

    This is an application that used to run as a console window, but since it
    also needs to run without an account being logged on, I turned it into a
    service. Since the application is a real-time automated monitoring tool,
    there are times when it is necessary to observe what is scrolling by on the
    screen.

    If this isn't the best place to post this question, which group might be
    better suited to answer my question? (I tried the microsoft.public.win2000
    groups.)

    Thanks for all the help.
    Cosmic Cruizer, Feb 13, 2004
    #1
    1. Advertising

  2. Cosmic Cruizer

    Ben Morrow Guest

    (Cosmic Cruizer) wrote:
    > I would think this question is more suitable for a Microsoft forum, but
    > since I have not received any replies to the questions I posted there, I'm
    > back here again.
    >
    > Now that I am finally successful in turning my Perl scripts into services,
    > is it possible to have the service display a console window when the account
    > is used to logon? If yes, what changes do I need to make to my service?
    >
    > This is an application that used to run as a console window, but since it
    > also needs to run without an account being logged on, I turned it into a
    > service. Since the application is a real-time automated monitoring tool,
    > there are times when it is necessary to observe what is scrolling by on the
    > screen.
    >
    > If this isn't the best place to post this question, which group might be
    > better suited to answer my question? (I tried the microsoft.public.win2000
    > groups.)


    I would have said you want two programs: one that sits in the
    background doing its stuff, and then another that connects to it and
    asks for current monitoring info. Or the daemon (sorry, service) could
    log all it's info to a file or to whatever windows' equivalent of
    syslog is, and you could view it later at lesiure.

    Ben

    --
    "The Earth is degenerating these days. Bribery and corruption abound.
    Children no longer mind their parents, every man wants to write a book,
    and it is evident that the end of the world is fast approaching."
    -Assyrian stone tablet, c.2800 BC
    Ben Morrow, Feb 13, 2004
    #2
    1. Advertising

  3. Ben Morrow <> wrote in
    <c0hecl$76m$>:

    >
    >I would have said you want two programs: one that sits in the
    >background doing its stuff, and then another that connects to it and
    >asks for current monitoring info. Or the daemon (sorry, service) could
    >log all it's info to a file or to whatever windows' equivalent of
    >syslog is, and you could view it later at lesiure.
    >
    >Ben
    >


    The case of reading the info from a log file was already determined to be
    impractical, but I never consider having a secondary application that could
    connect to the service. I like this idea. I'm not yet quite sure on what I
    need to do, but it sounds like an interesting and challenging little
    exercise.

    Thanks Ben.
    Cosmic Cruizer, Feb 13, 2004
    #3
  4. Cosmic Cruizer

    Thomas Kratz Guest

    Herb Martin wrote:

    > I think Ben is still correct that you might prefer a two program solutions
    > with the
    > service acting as server to the other program but....
    >
    > On a Windows service there is a setting "interact with desktop"; without
    > this the
    > service may not display anything directly to the user. Check that
    > (literally and
    > figuratively) and you can probably display a command window depending on
    > when and where you want it to appear.
    >


    By the way: this is only possible if the service runs under the local
    system account.

    Thomas

    --
    open STDIN,"<&DATA";$=+=14;$%=50;while($_=(seek( #J~.> a>n~>>e~.......>r.
    STDIN,$:*$=+$,+$%,0),getc)){/\./&&last;/\w| /&&( #.u.t.^..oP..r.>h>a~.e..
    print,$_=$~);/~/&&++$:;/\^/&&--$:;/>/&&++$,;/</ #.>s^~h<t< ..~. ...c.^..
    &&--$,;$:%=4;$,%=23;$~=$_;++$i==1?++$,:_;}__END__#....>>e>r^..>l^...>k^..
    Thomas Kratz, Feb 13, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael
    Replies:
    4
    Views:
    410
    Matt Hammond
    Jun 26, 2006
  2. Merciadri Luca
    Replies:
    4
    Views:
    809
  3. Replies:
    3
    Views:
    186
    Josef Moellers
    Nov 1, 2007
  4. Steven D'Aprano
    Replies:
    0
    Views:
    90
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    82
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page