Редагувати

Поділитися через


WLANProfile element

The WLANProfile element contains a wireless LAN profile. This element is the unique root element for a wireless profile.

The target namespace for the WLANProfile element is https://www.microsoft.com/networking/WLAN/profile/v1.

<xs:element name="WLANProfile">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="name"
                type="nameType"
             />
            <xs:element name="SSIDConfig"
                maxOccurs="256"
                ...
             />
            <xs:element name="Hotspot2"
                minOccurs="0"
                ...
             />
            <xs:element name="connectionType">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="IBSS">
                        <xs:enumeration value="ESS">
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="connectionMode"
                minOccurs="0"
             >
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="auto">
                        <xs:enumeration value="manual">
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="autoSwitch"
                minOccurs="0"
                type="boolean"
             />
            <xs:element name="MSM"
                minOccurs="0"
                ...
             />
            <xs:element name="IHV"
                minOccurs="0"
                ...
             />
            <xs:element name="MacRandomization"
                ...
             />
            <xs:any
                processContents="lax"
                minOccurs="0"
                maxOccurs="unbounded"
                namespace="##other"
             />
        </xs:sequence>
    </xs:complexType>
</xs:element>

Parent elements

None.

Child elements

Element Type Description
name nameType Name of the WLAN profile.
SSIDConfig Contains one or more SSIDs for wireless LANs.
Hotspot2 Extends the WLAN Profile Schema v1 to support Hotspot 2.0 networks.
connectionType Indicates whether the network is infrastructure ("ESS") or ad-hoc ("IBSS").
connectionMode Indicates whether connection to the wireless LAN should be automatic ("auto") or initiated ("manual") by user. This element is optional.
autoSwitch boolean Determines the roaming behavior of an auto-connected network when a more preferred network is in range. This element is optional, and has no effect on a manually connected network.
MSM Contains various media-specific module (MSM) settings.
IHV Contains various settings for independent hardware vendors.
MacRandomization Configures the randomization of MAC addresses.

name

Contains the name of a wireless LAN profile.

A name is case-sensitive.

For Windows XP with Service Pack 3 (SP3) and Wireless LAN API for Windows XP with Service Pack 2 (SP2), the name element is ignored when the profile is saved in the profile store. The name of the profile is derived from the SSID of the network. For infrastructure network profiles, the name of the profile is the SSID of the network. For ad hoc network profiles, the name of the profile is the SSID of the ad hoc network followed by -adhoc. XML escape characters, such as &, are not displayed. Avoid using XML escape characters in SSID names for profiles deployed on Windows XP with SP3 or Wireless LAN API for Windows XP with SP2.

For any network profile intended for use only on Windows Vista or Windows Server 2008, the name can be any string.

connectionType

The connectionType element indicates the operating mode of the network. A value of ESS indicates an infrastructure network, while IBSS indicates an ad-hoc network.

connectionMode

The connectionMode (WLANProfile) element indicates whether connection to a wireless LAN should be automatic or initiated by user.

If connectionType is set to ESS, this value can be either auto or manual. The default value is auto if this element is absent.

If connectionType is set to IBSS, this value must be manual.

<xs:element name="connectionMode">
    <xs:simpleType>
        <xs:restriction
            base="string"
        >
            <xs:enumeration
                value="auto"
             />
            <xs:enumeration
                value="manual"
             />
        </xs:restriction>
    </xs:simpleType>
</xs:element>

The following table describes the enumeration values.

Value Description
auto The connection to the wireless network should be initiated automatically whenever the network is in range.
manual The connection to the wireless network is only initated upon the explicit request of a user.

autoSwitch

Determines the roaming behavior of an auto-connected network when a more preferred network is in range. This element is optional.

If autoSwitch is "true" and connectionMode is set to "auto", a connection to a more preferred network must be attempted whenever a more preferred network comes into range. A more preferred network is one that is ordered higher in the list of preferred wireless networks. This connection attempt occurs when connected to another network.

If connectionMode is set to "auto", this value can be either "true" or "false".

If connectionMode is set to "manual", this value must be set to "false". This element has no effect on a manually connected network.

An autoSwitch value set to "true" results in a higher frequency of periodic scanning for new networks. This may result in increased radio frequency pollution from these periodic scans and increased power consumption used by the wireless network adapter.

Windows 7 and Windows Server 2008 R2 with the Wireless LAN Service installed: Changes are implemented on Windows 7 and Windows Server 2008 R2 with the Wireless LAN Service installed to optimize wireless networking performance. These changes are designed to reduce radio frequency pollution, power consumption, and disruption to real-time traffic over wireless networks. The default setting for autoSwitch when this element is not set in a wireless LAN profile has changed. The default setting is changed to "false" on Windows 7 and Windows Server 2008 R2 with the Wireless LAN Service installed. The default setting was "true" on Windows Server 2008 and Windows Vista. It is recommended that the value of the autoSwitch element used by an application in a wireless LAN profile be set to "false" to reduce the frequency of periodic scanning for new networks, unless it is absolutely necessary for an application to set this value to "true".

Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: This element isn't supported.

Remarks

Most child elements of the WLANProfile element are in the https://www.microsoft.com/networking/WLAN/profile/v1 namespace. There are two exceptions: the FIPSMode element is in the https://www.microsoft.com/networking/WLAN/profile/v2 namespace, and the OneX element is in the https://www.microsoft.com/networking/OneX/v1 namespace.

To view the list of child elements in a tree-like structure, see WLAN_profile Schema Elements.

Examples

To view sample profiles, see Wireless profile samples.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP3 [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Redistributable Wireless LAN API for Windows XP with SP2