----------8<--------
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?
----------8<--------
Can you not just feed it $ENV{'COMPUTERNAME'} ?
The other thing I remember doing a while back when we were migrating
machines was copying everything in $ENV{'windir'}\Tasks and putting it
all in the new machine's Tasks folder. In your case you should be able
to create the tasks locally and move/copy them over to the destination
machine.
HTH,
Just in
PS/ Even though you don't see it listed the extensions to scheduled
tasks are .job
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs