in reply to Re: Win32::Daemon on Windows 2019 has options greyed out
in thread Win32::Daemon on Windows 2019 has options greyed out

Thanks,

I tried the test at that link and get the same results:

C:\Users\john\test>perl Create.pl Successfully added. finished. C:\Users\john\test>net start perltest The Perl: Test of Win32::Daemon ($ServiceName) service is starting. The Perl: Test of Win32::Daemon ($ServiceName) service was started suc +cessfully. C:\Users\john\test>net pause perltest The requested pause, continue, or stop is not valid for this service. More help is available by typing NET HELPMSG 2191. C:\Users\john\test>net stop perltest The requested pause, continue, or stop is not valid for this service. More help is available by typing NET HELPMSG 2191.

All of the menu options are greyed out for starting, stopping, etc. for the PerlTest service, just as they are for my service.

John

Replies are listed 'Best First'.
Re^3: Win32::Daemon on Windows 2019 has options greyed out
by SwaJime (Scribe) on Oct 08, 2019 at 15:37 UTC

    Actually, I think I just figured it out.

    if ($Win32::Daemon::VERSION < 20180000) { Win32::Daemon::AcceptedControls(SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_SHUTDOWN | SERVICE_ACCEPT_PARAMCHANGE | SERVICE_ACCEPT_NETBINDCHANGE); }

    The problem seems to be that this should not be in an if statement. For some reason I thought this call did not need to be made for Win32::Daemon version 20181025, which is on this system.