Re: How to get user home directory on Windows

2008-01-14 Thread Giampaolo Rodola'
Thanks to Tim Golden suggestions I solved my problem. ...In case it would help someone: import _winreg import win32security username = 'Administrator' sid = win32security.ConvertSidToStringSid( win32security.LookupAccountName(None, username)[0] ) key = _winreg.OpenKey( _win

Re: How to get user home directory on Windows

2008-01-14 Thread Lie
On Jan 14, 8:21 am, "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > Giampaolo Rodola' wrote: > > Hi all, > > I'm trying to use the pywin32 extension to find out the user's home > > directory but currently I didn't find a solution yet. > > What I'd need to do is not getting the home directory of th

Re: How to get user home directory on Windows

2008-01-13 Thread Tim Golden
Martin P. Hellwig wrote: > Giampaolo Rodola' wrote: >> Hi all, >> I'm trying to use the pywin32 extension to find out the user's home >> directory but currently I didn't find a solution yet. >> What I'd need to do is not getting the home directory of the currently >> logged in user but something li

Re: How to get user home directory on Windows

2008-01-13 Thread Martin P. Hellwig
Giampaolo Rodola' wrote: > Hi all, > I'm trying to use the pywin32 extension to find out the user's home > directory but currently I didn't find a solution yet. > What I'd need to do is not getting the home directory of the currently > logged in user but something like: > get_homedir("frank")

Re: How to get user home directory on Windows

2008-01-13 Thread Tim Golden
thebjorn wrote: > On Jan 12, 6:50 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: >> Update. >> I found a way for getting the home directory of the user but it >> requires to validate the user by providing username+password: >> >> def get_homedir(username, password): >> token = win32security

Re: How to get user home directory on Windows

2008-01-13 Thread thebjorn
On Jan 12, 6:50 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > Update. > I found a way for getting the home directory of the user but it > requires to validate the user by providing username+password: > > def get_homedir(username, password): > token = win32security.LogonUser( > us

Re: How to get user home directory on Windows

2008-01-12 Thread Giampaolo Rodola'
Update. I found a way for getting the home directory of the user but it requires to validate the user by providing username+password: def get_homedir(username, password): token = win32security.LogonUser( username, None, password, win32security.LOGON32_LOGON_NETW

Re: How to get user home directory on Windows

2008-01-12 Thread Giampaolo Rodola'
On 12 Gen, 17:44, Christian Heimes <[EMAIL PROTECTED]> wrote: > Giampaolo Rodola' wrote: > > Is there a way to do that? > > home = os.path.expanduser("~") > > Christian That gives the home of the *current logged in user*. I need another thing. -- http://mail.python.org/mailman/listinfo/python-lis

Re: How to get user home directory on Windows

2008-01-12 Thread Christian Heimes
Giampaolo Rodola' wrote: > Is there a way to do that? home = os.path.expanduser("~") Christian -- http://mail.python.org/mailman/listinfo/python-list