win32net.NetUserGetInfo error

KellyK kelly.kranabetter at gems6.gov.bc.ca
Wed Jul 18 01:30:21 CEST 2001


If the userid is on (a trusted or whatever) domain you could try:

>>> import win32net
>>> import win32api
>>> win32net.NetUserGetInfo("\\\\" + str(win32api.GetDomainName()), win32api.GetUserName(), 1)


On 13 Jul 2001 14:01:38 -0700, pjakobsen at blueairnetworks.com (Peder
Jakobsen) wrote:

>import win32api
>import win32net
>
>userName=win32api.GetUserName()
>info=win32net.NetUserGetInfo(None, userName, 1)
>
>I get the following error
>
>Traceback (most recent call last):
>  File "<interactive input>", line 1, in ?
>api_error: (2221, 'NetUserGetInfo', 'The user name could not be found.')




More information about the Python-list mailing list