Freigeben über


SetProxySetting method of the Win32_Proxy class

The SetProxySetting WMI class method creates a persistent Internet connection for Windows Product Activation (WPA) using the specified address and port number.

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

Syntax

uint32 SetProxySetting(
  [in] string ProxyAddress,
  [in] string ProxyPortNumber
);

Parameters

ProxyAddress [in]

Server name or IP address of the proxy server.

ProxyPortNumber [in]

Proxy port number.

Remarks

Because the proxy server setting is persistent, it may be advisable to query the class's properties before calling SetProxySetting. The original properties could then be restored if required.

This method is the scriptable equivalent to setting the proxy server using the Connections tab of the Internet Options dialog in Internet Explorer or in Control Panel.

Note

Windows Product Activation is not available on the Itanium-based versions of the Windows operating system.

Requirements

Minimum supported client
Windows XP
Minimum supported server
Windows Server 2003
End of client support
Windows XP
End of server support
Windows Server 2003 R2
Namespace
Root\CIMV2
MOF
Licwmi.mof
DLL
Licwmi.dll

See also

Win32_Proxy

Windows Product Activation Provider