in reply to Starting a process from a win32 perl service

Just a guess, but you may find that you have to check the "Allow service to interact with desktop" checkbox on the "Log On" tab of the service's "Properties" dialog--via Start->Settings->Control Panel->Adminastrative Tools->Services.

Alternatively, if the service doesn't need to retain links with IE after it is started, you may be able to set a combination of flags in the dwCreationFlags parameter (see Process creation flags) that will allow the window to become visible. In particular, CREATE_NEW_PROCESS_GROUP may have the desired effect.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

Replies are listed 'Best First'.
Re^2: Starting a process from a win32 perl service
by displeaser (Hermit) on Feb 09, 2005 at 11:13 UTC
    Hi,
    cheers for the reply.

    I'm running the service under a particular user account and not the system account so you don't get the option.

    Hmm, I'll try give that a go (fingers crossed). Thanks for that.

    j
      Hi again,
      I've been able to get it to work under the system account & allow interactive desktop. Though I don't see why it won't work when setup under a specific user account (my prefered way of doing it). I even tried playing with the service "type" (setting it to 256) in the registry trying to force it to be interactive but that didnt work either. Possably an NT quirk (or security feature ;-)
      Ah well, it's working now anyways.

      Thanks for the suggestions and help.

      J