A few things: Services can interact with the command line or the network, not both. Services will fail if they must do both.
Use the srvany.exe to run your perl script as a service.
~Hammy
Ommmmm.....
| [reply] |
Services can interact with the command line or the network
I think you mean desktop as opposed to command line.
By default, the service will probably run as LocalSystem - which has the option of accessing the desktop, but can't access the network. If you run it as a domain\workgroup user, it will be able to access the network and it will be able to spawn processes, but they won't be visible to the interactive user.
Finally, I prefer Win32::Daemon to srvany.exe - It's a bit more work, but so much more powerful.
update: No. I don't have shares in Dave Roth!
_________________________________________
Simon Flack ($code or die)
$,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
=~y'_"' ';eval"die";print $_,lc substr$@,0,3;
| [reply] |
A service should not need to access the desktop. It can, BTW, throw up a message box for an error and it will be visible to any desktop that's current. There's a special flag in MessageBox for this.
But the service will normally work behind the scenes. Another program, running as a normal program in the current interactive user's account, can interact with the user and communicate with the service. That's the model MS describes.
| [reply] |