Retrieve Win32 domain name

Salim Fadhley salimfadhley at gmail.com
Tue Aug 26 04:39:55 EDT 2008


I'm looking for a method to retrieve a Windows Domain name (not a DNS
Domain name).

I know this can be done by simply reading an environment variable,
however on the machines I need to work with sometimes the environment
variables can be messed-up and are not trustworthy.

Is there somebody who knows the Win32 library who can point me to the
function I need? The Win32Net seems to contain a whole load of
functions for manipulating Windows networking resources, however I
couldn't find a function which simply returned information about the
local computer.

Thanks!



More information about the Python-list mailing list