Problems with executing scheduled script
Hi,
the scheduled job you've created is in reality an "AT" job. WMI has no
interface to create that, what one calls a "Task Scheduler Job", which would
allow you to specify credentials. The AT job, create by WMI, is running with
"LocalSystem" account and has normally no network rights. I am wondering,
why it works somethimes. This could depend on the fact that the remote
comouter [your \\myserver\] trusts some of your workstation, but not all. If
you run the script interactively, your logged-on credentails are used to
execute the script and to connect to the remote server also. This can
explain, why this works.
Having no public scriptable interface to the Task Scheduler is a real pain
under windows :-(
but the times have changes a bit and there is one.
There is a COM dll, which is part of the "Site Server Resource Kit", this
has a scriptable interface also, but this is not publicly available. There
is a very little know automation interface, published in Technet or MSDN [a
quick search gave me:
http://www.microsoft.com/downloads/details.aspx?FamilyID=601d75e2-f907-4e51-ad88-adb818df1d27&displaylang=en ]
..
As part of the "Windows 2000 Resource Kit", you'll find also "jit.exe" [so
far I remember correctly], which allows to create and change Schdulted task
and also to specify the right permissions.
If you use net, there are some free libraries to interact with the Scheduled
Task COM interface.
No WMI :-(
Hope, this helps.
Best regards,
Manfred Braun
(Private)
Mannheim
Germany
mailto:_manfred.braun_@manfbraun.de
(Remove the anti-spam-underscore to mail me!)
|