List Info

Thread: os.startfile() not working after py2exe into a service




os.startfile() not working after py2exe into a service
user name
2006-01-18 21:39:58
Hopefully someone can enlighten me with this Windows issue.

I use os.startfile() to launch pdf and html files. So far so
good.

Build using py2exe. Install as service. When os.startfile()
is ran inside  
service, nothing happens. No error message. Nothing as all.

Even if I build it as .exe, the os.startfile() would
function.

I'm suspecting priviledge issue. But even if I change the
service logon as  
myself instead of LocalAdmin, it makes no difference.

Any help is much appriciated.

wy

_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
os.startfile() not working after py2exe into a service
user name
2006-01-18 22:45:00
On 1/18/06, aurora <aurora00gmail.com> wrote:
> Build using py2exe. Install as service. When
os.startfile() is ran inside
> service, nothing happens. No error message. Nothing as
all.
[...]
> I'm suspecting priviledge issue. But even if I change
the service logon as
> myself instead of LocalAdmin, it makes no difference.

You probably need to set the service to "interact with
desktop" -
otherwise your files probably are being opened, but the
window is not
visible as it has no access to the user's screen.

Paul.
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
os.startfile() not working after py2exe into aservice
user name
2006-01-18 22:43:46
> Hopefully someone can enlighten me with this Windows
issue.
>
> I use os.startfile() to launch pdf and html files. So
far so good.
>
> Build using py2exe. Install as service. When
os.startfile() is
> ran inside
> service, nothing happens. No error message. Nothing as
all.
>
> Even if I build it as .exe, the os.startfile() would
function.
>
> I'm suspecting priviledge issue. But even if I change
the service
> logon as
> myself instead of LocalAdmin, it makes no difference.

Have you tried it as a service running from a .py file?  If
you have the
same problem it is not related to py2exe.

Note that services generally have no access to your desktop,
so the
startfile() may actually be succeeding, but invisible to
you.  Try playing
with the "Allow service to interact with the
desktop" flag, but even then,
doing this kind of thing from a service is not recommended
(services really
are designed for programs that never need to interact with
the user)

Mark

_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )