PEP proposal for user.py (win32 part) (con't)
Gillou
nospam at bigfoot.com
Wed Jan 23 10:09:59 EST 2002
>
> P.S. You should never dig into the registry for the Personal folder. It
> varies depending on Terminal Server and I think some XP weirdness. You
have
> to use SHGetSpecialFolderLocation(CSIDL_PERSONAL), available on all
versions
Okay, the environment variables don't do the job, and I should not dig into
the registry (why ? how do desktop apps to find the user personal folder ?)
I can't use SHGetSpecialFolderLocation(CSIDL_PERSONAL) with the standard
python distribution (need win32all extensions ?)
So is there another place available in any Win32 box to find the personal
user folder ?
>
> And I assume you meant HKEY_CURRENT_USER, not HKEY_LOCAL_MACHINE. The
> latter returns the Personal folder only for Administrator.
>
You're right, the code (line 4) shoud be :
...
shellkey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, shellkeyId)
...
More information about the Python-list
mailing list