in reply to Laziness and the Win32::Daemon
It isn't that hard to install a service remotely. You just copy the files to the Admin$ share and remotely add a small subtree to the registry. When the computer reboots, the service is installed and runs. What to put in the Registry can be determined by installing the service on your machine and copying.
You can even not be so hackish and use the Win32 API for installing services and probably get the service running without the remote computer being rebooted (though I haven't actually done that so I can't promise, it just appears that such would be so).
You can also run remote commands according to Using WMI for create a remote Process on Win32.
BTW, I'm one of those pissy users ;) and would likely disable your daemon when I found it. Having a Perl script run as a daemon isn't a trivial matter. Perl chooses "use more memory" at nearly every design trade-off and having my work interfered with because you think you need an inventory of my machine and silently installed a memory-hogging daemon isn't going to make me happy.
I'd rather you get an inventory by running the script at midnight w/o installing stuff on my computer. You need to figure out what computers are on your network anyway (if you don't know this already then you must be using DHCP so you could look to your DHCP servers for the answer), so track that and when was the last time you got an inventory on that computer. Each midnight, try to get an inventory on computers that are due one. If any computers go two weeks after that without ever being running at midnight, then run the inventory on them at noon.
Or you can go the other route and buy SMS from Microsoft and treat all of your users like trespassers on their desktop. ;)
- tye (but my friends call me "Tye")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (tye)Re: Laziness and the Win32::Daemon
by Macphisto (Hermit) on Jun 20, 2001 at 21:03 UTC | |
by tye (Sage) on Jun 20, 2001 at 21:09 UTC | |
by joefission (Monk) on Jun 20, 2001 at 21:49 UTC |