hennesse has asked for the wisdom of the Perl Monks concerning the following question:

When creating a new service, I want to "allow service to interact with the desktop".

The documentations says:

service_type An integer representing the type of the service; defaults to SERVI +CE_WIN32_OWN_PROCESS.
Win32::Daemon.pm shows:
SERVICE_WIN32_OWN_PROCESS SERVICE_WIN32_SHARE_PROCESS SERVICE_KERNEL_DRIVER SERVICE_FILE_SYSTEM_DRIVER SERVICE_INTERACTIVE_PROCESS
And the example shows:
Win32::Daemon::CreateService( \%Hash ) %Hash = ( machine => '', name => 'Brewery', display => 'The Electronic Brewery', path => $ServicePath, user => '', pwd => '', description => 'The Electronic Brewery', parameters => $ServiceParams );

I tried adding a key service_type => various integers
but all my guesses have failed.

Anyone got the "straight dope"?
Thanks - Dave

Replies are listed 'Best First'.
Re: Win32::Daemon - interactive
by BrowserUk (Patriarch) on Oct 21, 2011 at 00:50 UTC

    If you are on Vista or newer, then to the best of my knowledge, you cannot do this any more. See Re^6: Turn a perl script into a Win32 Service for the little more I know, and where that info came from.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Win32::Daemon - interactive
by Anonymous Monk on Oct 21, 2011 at 00:44 UTC

    I tried adding a key service_type => [various integers] but all my guesses have failed. Anyone got the "straight dope"?

    So you literally tried an array of various integers?

    Try int | int | int | int

    service_type => ... SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PR +OCESS
Re: Win32::Daemon - interactive
by hennesse (Beadle) on Oct 21, 2011 at 01:30 UTC

    Thanks - That worked!

    I tried just service_type => SERVICE_INTERACTIVE_PROCESS
    but that didn't work. Or I fumble-fingered it.

    Thanks - Dave