Retrieve Win32 domain name

S

Salim Fadhley

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!
 
G

Gabriel Genellina

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.

You didn't search enough then: try win32net.NetWkstaGetInfo(None, 100)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top