[python-win32] winshell error

Tim Roberts timr at probo.com
Thu Jan 24 19:40:27 CET 2008


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.

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.

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



More information about the python-win32 mailing list