EnableWINS method of the Win32_NetworkAdapterConfiguration class

The EnableWINS WMI class static method enables Windows Internet Naming Service (WINS) settings specific to TCP/IP, but independent of the network adapter.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


uint32 EnableWINS(
  [in]           boolean DNSEnabledForWINSResolution,
  [in]           boolean WINSEnableLMHostsLookup,
  [in, optional] string  WINSHostLookupFile,
  [in, optional] string  WINSScopeID
);

Parameters

DNSEnabledForWINSResolution [in]

If true, the Domain Name System (DNS) is enabled for name resolution over WINS resolution.

WINSEnableLMHostsLookup [in]

If true, local lookup files are used. Lookup files will contain mappings of IP addresses to host names.

WINSHostLookupFile [in, optional]

Lookup files that contain mappings of IP addresses to host names. If available, the files will be found in %SystemRoot%\system32\drivers\….

WINSScopeID [in, optional]

Scope identifier value that will be appended to the end of the computer's NetBIOS name. Systems that use the same scope identifier can communicate with this computer.

Return value

Returns a value of 0 (zero) for a successful completion when no reboot is required; 1 (one) for a successful completion when a reboot is required; a different number if there is an error. For more information on error codes, see WMI Error Constants or WbemErrorEnum. For general HRESULT values, see System Error Codes.

Successful completion, no reboot required (0)
Successful completion, reboot required (1)
Method not supported on this platform (64)
Unknown failure (65)
Invalid subnet mask (66)
An error occurred while processing an Instance that was returned (67)
Invalid input parameter (68)
More than 5 gateways specified (69)
Invalid IP address (70)
Invalid gateway IP address (71)
An error occurred while accessing the Registry for the requested information (72)
Invalid domain name (73)
Invalid host name (74)
No primary/secondary WINS server defined (75)
Invalid file (76)
Invalid system path (77)
File copy failed (78)
Invalid security parameter (79)
Unable to configure TCP/IP service (80)
Unable to configure DHCP service (81)
Unable to renew DHCP lease (82)
Unable to release DHCP lease (83)
IP not enabled on adapter (84)
IPX not enabled on adapter (85)
Frame/network number bounds error (86)
Invalid frame type (87)
Invalid network number (88)
Duplicate network number (89)
Parameter out of bounds (90)
Access denied (91)
Out of memory (92)
Already exists (93)
Path, file or object not found (94)
Unable to notify service (95)
Unable to notify DNS service (96)
Interface not configurable (97)
Not all DHCP leases could be released/renewed (98)
DHCP not enabled on adapter (100)
Other (101–4294967295)

Examples

The Enable WINS for All Network Adapters VBScript code sample, on TechNet Gallery, uses EnableWINS to Enables WINS on all the network adapters installed in a computer.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Namespace

Root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

See also

Computer System Hardware Classes
Win32_NetworkAdapterConfiguration
WMI Tasks: Networking
WMI Tasks: Accounts and Domains
IPv6 and IPv4 Support in WMI

 

 

Show: