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
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
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
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")
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
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
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
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
Giampaolo Rodola' wrote:
> Is there a way to do that?
home = os.path.expanduser("~")
Christian
--
http://mail.python.org/mailman/listinfo/python-list