[python-win32] winshell error

Mike Driscoll mdriscoll at co.marshall.ia.us
Thu Jan 24 21:25:36 CET 2008


> ------------------------------
> 
> Message: 9
> Date: Thu, 24 Jan 2008 10:40:27 -0800
> From: Tim Roberts <timr at probo.com>
> Subject: Re: [python-win32] winshell error
> To: Python-Win32 List <python-win32 at python.org>
> Message-ID: <4798DB9B.6060505 at probo.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Mike Driscoll wrote:
> > I have a Python login script that runs various things on 
> login for the
> > users in our Windows domain. Every once in a while, I'll 
> get a traceback
> > when I use winshell to try to find the user's desktop. The 
> offending code
> > is:
> >
> > userDesktop = winshell.desktop()
> >
> > And the traceback:
> > ...
> > com_error: (-2147467259, 'Unspecified error', None, None)
> >   
> 
> That's 80004005, or E_FAIL.  Not very helpful.
> 
> How quickly does this run?  At login time, there is a transition from 
> the login window station to the interactive window station.  
> The login 
> window station runs under a system user account that doesn't have a 
> desktop.  As an experiment, you might try adding a delay of a 
> few seconds.


The run time depends on which location the user is in. We have some users
on a T1 and others on microwave. This particular user is on the T1, so the
script probably runs 20-40 seconds depending on the load. We have set a
registry setting to force the login script to run before the desktop is
loaded...not sure if that helps though.

I'll ask my boss if putting in a delay is something he would want.


> 
> Is it possible that this happens for a user that doesn't 
> currently have 
> a profile on that machine?  It takes time for the system to 
> build a new 
> profile for a first-time user, and until it's built, the 
> CSIDLs probably 
> do not exist.


This is a possibility, I suppose. I know that this user has been with our
company for quite a while, but since his department shares PCs, he may
have logged into a PC that he hasn't logged into before or that has had
its profiles cleaned.

I don't suppose anyone knows how to do a logout script? There are some
things that would be better off if we could do them on logout rather than
login.

> 
> -- 
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
> 
> 

Mike Driscoll
Applications Specialist




More information about the python-win32 mailing list