Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Exiting batch-started Perl script on WinXP shutdown

by Jenda (Abbot)
on Apr 17, 2012 at 15:11 UTC ( #965527=note: print w/replies, xml ) Need Help??

in reply to Re: Exiting batch-started Perl script on WinXP shutdown
in thread Exiting batch-started Perl script on WinXP shutdown

You may even look at a wrapper of that module: Win32::Daemon::Simple. It'll take care of installation/deinstalation, logging, will store settings in registry for you allowing you to change them by calling the script with the right parameters, do the looping for you in such a way that the program responds to the service manager's requests in a timely matter, etc.

The only catch is that you have to install a patch to Win32::Registry from (It was once supposed to replace the Win32::Registry on CPAN & within libwin32, but that somehow never happened.)

Enoch was right!
Enjoy the last years of Rome.

  • Comment on Re^2: Exiting batch-started Perl script on WinXP shutdown

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965527]
[thezip]: Is there an analogy for '&' (ie. run commandline process in background) for Windows commandline?
[Corion]: thezip: start "some title" path\to\that\ application, but that will open another console window
[Corion]: thezip: If you want to confuse your users, use system(1, "that\\command" );, which will make Perl launch it in the background
[Corion]: That will keep the console window open even though the user can't type into it anymore
[thezip]: So I have a script that generates a log file. After script completion, I want tohave VIM open this logfile.
[thezip]: i don't get the command line "back" until I close VIM. No what I want to happen...
[thezip]: I currently don't have access to CYGWIN, else I'd just do a tail -f on the logfile.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-03-27 18:48 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (321 votes). Check out past polls.