Lyle: Have you tried using the command Win32::NodeName() to get the name of the machine you're running on and then pass it in to SetTargetComputer when you want to work on the local machine?
Ken -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Lyle Kopnicky Sent: Wednesday, March 01, 2006 10:40 PM To: [email protected] Subject: Win32::TaskScheduler: local host? Hi folks, I'm using Win32::TaskScheduler to schedule tasks, sometimes on the local host, sometimes on remote hosts. My problem is that I can't figure out what to set the target computer for, when I want the local host. That is, what parameter do I feed to SetTargetComputer() when I want it to target the local host? Can I do this without knowing the name of the local host? I've found that if I create a new TaskScheduler, then by default it operates on the local host. But if I change it to point at another host, then want to point it back at the local host, I don't know how, without knowing the name of the local host. It isn't convenient, the way my code is set up, to create a new TaskScheduler every time, either. I've tried '\\', which fails, and the empty string, which succeeds for SetTargetComputer(), but fails when I call NewWorkItem(). According to MSDN, you're supposed to feed SetTargetComputer() a NULL to get it to target the local host. But I don't have any way of passing a NULL to the Perl version. I tried undef, and that generates an error. I tried 0, and that fails. Any ideas? -- Lyle Kopnicky Software Project Engineer Veicon Technology, Inc. _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _________________________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Espanol - Deutsch - Nederlands - Francais - Italiano - Norsk - Svenska - Japanese - Danish - Portuguese: www.cardinalhealth.com/legal/email _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
