[python-win32] Interacting with the desktop as a service onVista

Steven James steven.james at gmail.com
Thu Oct 23 19:34:22 CEST 2008


On Thu, Oct 23, 2008 at 1:04 PM, Sidnei da Silva
<sidnei at enfoldsystems.com>wrote:

> On Thu, Oct 23, 2008 at 2:54 PM, Steven James <steven.james at gmail.com>
> wrote:
> > Because I like fun stuff and knowing that people at cisco use hacks like
> > this, here you go, this should work...
> >
> > (cut to snippets because of length)
> > http://snippets.dzone.com/posts/show/6324
> >
> > As mentioned before, the basic process is to create a disabled Scheduled
> > Task. When you are ready to run it, you enable it, run it, then disable
> it
> > again. You can supply the credentials. I tried to make everything a
> variable
> > in the above post. Does not run under Windows XP (there wasn't a Task
> > Scheduler COM interface in XP AFAIK).
>
> I haven't tried your snippet, but we definitely have used COM to
> create Scheduled Tasks on Windows all the way back to Windows 2000. I
> suspect it does work on Windows XP unless it uses some new feature in
> Vista.
>
>
I'm glad to know that it was indeed possible in XP. It appears the Task
Scheduler API was updated with Windows Vista/2008 Server. There are
references on MSDN to "Task Scheduler 1.0" and "Task Scheduler 2.0"

I believe my snippet must use that 2.0 interface. It works only in Vista,
but my "just see if it runs" test on XP threw an exception at the Dispatch
command.

Steven James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081023/44a32a24/attachment.htm>


More information about the python-win32 mailing list