riglee
2004-08-30 16:25:19 UTC
I am trying to get the following information that is available via a call
to NetWkstaGetInfo. The returned struct has the following fields of
interest.
wki101_computername
wki101_langroup
I need to try and determine this information without relying on the
workstation service or the server service running. The rserver service will
be required to get the data from remote machines but I assume there is a
location in the registry that contains the information and would like to be
able to read it from the registry in all cases. I have tried the following
keys and to test them I changed the registry values and called
NetWkstaGetInfo. The result was unchanged as though I did not modify the
registry. So I assume another key is there for each but can't seem to find
it. Or, the service gets it at start up time and does not look back in the
registry when the call is made.
Here are the keys I was using and definitions I have pulled from the
following link:
http://www.jsiinc.com/SUBH/tip3900/rh3982.htm
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveCompu
terName\ComputerName is the current NetBIOS computer name.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerNam
e\ComputerName is the NetBIOS computer name that will be used when the
computer is restarted.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostna
me is the host name of the computer.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV
Hostname is the host name that the computer will take when it is restarted.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain
is the current DNS domain name. Domain may be empty or not present. The full
computer name is the values of Hostname + Domain.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV
Domain is the DNS domain name that the computer will use when it is
restarted. The full computer name after a restart is the values of NV
Hostname + NV Domain.
Any help would be most appreciated.
Thanks
to NetWkstaGetInfo. The returned struct has the following fields of
interest.
wki101_computername
wki101_langroup
I need to try and determine this information without relying on the
workstation service or the server service running. The rserver service will
be required to get the data from remote machines but I assume there is a
location in the registry that contains the information and would like to be
able to read it from the registry in all cases. I have tried the following
keys and to test them I changed the registry values and called
NetWkstaGetInfo. The result was unchanged as though I did not modify the
registry. So I assume another key is there for each but can't seem to find
it. Or, the service gets it at start up time and does not look back in the
registry when the call is made.
Here are the keys I was using and definitions I have pulled from the
following link:
http://www.jsiinc.com/SUBH/tip3900/rh3982.htm
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveCompu
terName\ComputerName is the current NetBIOS computer name.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerNam
e\ComputerName is the NetBIOS computer name that will be used when the
computer is restarted.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostna
me is the host name of the computer.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV
Hostname is the host name that the computer will take when it is restarted.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain
is the current DNS domain name. Domain may be empty or not present. The full
computer name is the values of Hostname + Domain.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV
Domain is the DNS domain name that the computer will use when it is
restarted. The full computer name after a restart is the values of NV
Hostname + NV Domain.
Any help would be most appreciated.
Thanks