Retrieve Win32 domain name

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Salim Fadhley

    Retrieve Win32 domain name

    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!
  • Gabriel Genellina

    #2
    Re: Retrieve Win32 domain name

    En Tue, 26 Aug 2008 05:39:55 -0300, Salim Fadhley <salimfadhley@g mail.com>
    escribi�:
    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.NetWks taGetInfo(None, 100)

    --
    Gabriel Genellina

    Comment

    Working...