[python-win32] Interacting with the desktop as a service onVista
Matt Herbert (matherbe)
matherbe at cisco.com
Fri Oct 24 20:25:57 CEST 2008
Steven,
Thanks, I will give this a try.
So then, is it fair to say that it is not possible (on Vista) to have a
service spawn a process as a different user, and have that new process
interact with the desktop?
-Matt
________________________________
From: python-win32-bounces+matherbe=cisco.com at python.org
[mailto:python-win32-bounces+matherbe=cisco.com at python.org] On Behalf Of
Steven James
Sent: Thursday, October 23, 2008 12:54 PM
To: python-win32 at python.org
Subject: Re: [python-win32] Interacting with the desktop as a
service onVista
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).
Steven James
On Wed, Oct 22, 2008 at 2:25 PM, Matt Herbert (matherbe)
<matherbe at cisco.com> wrote:
> -----Original Message-----
> From:
python-win32-bounces+matherbe=cisco.com at python.org
> [mailto:python-win32-bounces+matherbe
<mailto:python-win32-bounces%2Bmatherbe> =cisco.com at python.org]
> On Behalf Of Tim Roberts
> Sent: Wednesday, October 22, 2008 1:48 PM
> To: Python-Win32 List
> Subject: Re: [python-win32] Interacting with the
desktop as a
> service onVista
>
> Matt Herbert (matherbe) wrote:
> > My situation is I have a python service which runs
24/7.
> Occasionally
> > The service needs to access windows on the desktop.
That
> is, it needs
> > to enumerate all the windows, find a specific
pop-up, and
> press a button.
> >
>
> Wow, this sounds like an incredible hack impersonating
as a feature.
> For my own curiousity, is this for a test lab
somewhere, or
> is this actually part of a product?
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
Tim,
This is strictly for a test lab. To be more specific
it's for automated
testing of a product. The product has features that need
to be tested
both when a user is logged in and when there is nobody
logged into the
system. For the automation to be able to Test both of
these situations,
it needs to run as a service. Hence, my dilemma.
-Matt
_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081024/e85f64be/attachment.htm>
More information about the python-win32
mailing list