Windows Wireless Zero Configuration (WZC) / WCN-UFD and WPA-RADIUS@ WinXP

Discussion in 'Wireless Networking' started by Thomas Creutz, Feb 15, 2008.

  1. Hello List!

    I searched a way, to deploy my WLAN settings for XP Clients. After
    search this Group i found this thread who defines how we can do a auto
    setup the Wireless Settings:

    news:

    Now i try to setup with the wizard the WPA-Radius, but it has no option
    for it. After searching the web, i found the spec for the Wsetting.wfc file:

    For XP:
    http://www.microsoft.com/whdc/Rally/WCN-UFD_XPspec.mspx

    For Vista:
    http://download.microsoft.com/downl...-4800-8a0a-b18336565f5b/WCN-UFD_Vistaspec.doc


    Now i followed the Definitions and build the follow file:

    <?xml version="1.0"?>
    <wirelessProfile
    xmlns="http://www.microsoft.com/provisioning/WirelessProfile/2004"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.microsoft.com/provisioning/WirelessProfile/2004
    WSETTING.xsd">
    <config>
    <configId>0007089E-3226-48AD-B771-12B3E8537686</configId>
    <configAuthorId>0B4E59B8-8317-46B2-B8C2-C46850162E6C</configAuthorId>
    <configAuthor>Microsoft Wireless Network Setup Wizard</configAuthor>
    </config>
    <ssid>RSR</ssid>
    <connectionType>ESS</connectionType>
    <deviceMode>infrastructure</deviceMode>
    <primaryProfile>
    <authentication>WPA</authentication>
    <encryption>TKIP</encryption>
    <networkKey>00000000000000</networkKey>
    <keyProvidedAutomatically>1</keyProvidedAutomatically>
    <ieee802Dot1xEnabled>1</ieee802Dot1xEnabled>
    <eapMethod>PEAP-EAP-TLS</eapMethod>
    </primaryProfile>
    </wirelessProfile>

    But the problem is, that XP+SP2 don't read/interpret the file correctly.
    I get only the Error Message:

    Es wurden keine Informationen gefunden, die zum Einrichten des Netzwerks
    erforderlich sind bzw. die Informationen sind nicht verwendbar. Führen
    Sie den Assistenten erneut auf dem ursprünglichen Computer aus.

    (Sorry - thats the Original German Error Message - I try to translate)

    No Information found, for Setup the Network btw. the information are not
    useful. ......

    In the Documentation is the XML Schema for this file. I validated this
    file against the schema and found no error.

    My next try was with the same usb stick and the same files on a Vista
    Notebook. Result: All ok: The files created my Wireless Network
    Connection (But some tasks are left: Cert, and some check boxes - @ MS:
    this stuff should also integrated!!)

    My Result: There is no way, to make a silent Wireless Setup with RADUIS
    for Users with don't have any know how!

    Thomas Creutz
     
    Thomas Creutz, Feb 15, 2008
    #1
    1. Advertising

  2. Re: Windows Wireless Zero Configuration (WZC) / WCN-UFD and WPA-RADIUS @ WinXP

    Hi
    To you have a central server run RADIUS?
    Jack (MVP-Networking).

    "Thomas Creutz" <> wrote in message
    news:OFJ5rG%...
    > Hello List!
    >
    > I searched a way, to deploy my WLAN settings for XP Clients. After
    > search this Group i found this thread who defines how we can do a auto
    > setup the Wireless Settings:
    >
    > news:
    >
    > Now i try to setup with the wizard the WPA-Radius, but it has no option
    > for it. After searching the web, i found the spec for the Wsetting.wfc
    > file:
    >
    > For XP:
    > http://www.microsoft.com/whdc/Rally/WCN-UFD_XPspec.mspx
    >
    > For Vista:
    > http://download.microsoft.com/downl...-4800-8a0a-b18336565f5b/WCN-UFD_Vistaspec.doc
    >
    >
    > Now i followed the Definitions and build the follow file:
    >
    > <?xml version="1.0"?>
    > <wirelessProfile
    > xmlns="http://www.microsoft.com/provisioning/WirelessProfile/2004"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xsi:schemaLocation="http://www.microsoft.com/provisioning/WirelessProfile/2004
    > WSETTING.xsd">
    > <config>
    > <configId>0007089E-3226-48AD-B771-12B3E8537686</configId>
    > <configAuthorId>0B4E59B8-8317-46B2-B8C2-C46850162E6C</configAuthorId>
    > <configAuthor>Microsoft Wireless Network Setup Wizard</configAuthor>
    > </config>
    > <ssid>RSR</ssid>
    > <connectionType>ESS</connectionType>
    > <deviceMode>infrastructure</deviceMode>
    > <primaryProfile>
    > <authentication>WPA</authentication>
    > <encryption>TKIP</encryption>
    > <networkKey>00000000000000</networkKey>
    > <keyProvidedAutomatically>1</keyProvidedAutomatically>
    > <ieee802Dot1xEnabled>1</ieee802Dot1xEnabled>
    > <eapMethod>PEAP-EAP-TLS</eapMethod>
    > </primaryProfile>
    > </wirelessProfile>
    >
    > But the problem is, that XP+SP2 don't read/interpret the file correctly.
    > I get only the Error Message:
    >
    > Es wurden keine Informationen gefunden, die zum Einrichten des Netzwerks
    > erforderlich sind bzw. die Informationen sind nicht verwendbar. Führen
    > Sie den Assistenten erneut auf dem ursprünglichen Computer aus.
    >
    > (Sorry - thats the Original German Error Message - I try to translate)
    >
    > No Information found, for Setup the Network btw. the information are not
    > useful. ......
    >
    > In the Documentation is the XML Schema for this file. I validated this
    > file against the schema and found no error.
    >
    > My next try was with the same usb stick and the same files on a Vista
    > Notebook. Result: All ok: The files created my Wireless Network
    > Connection (But some tasks are left: Cert, and some check boxes - @ MS:
    > this stuff should also integrated!!)
    >
    > My Result: There is no way, to make a silent Wireless Setup with RADUIS
    > for Users with don't have any know how!
    >
    > Thomas Creutz
     
    Jack \(MVP-Networking\)., Feb 16, 2008
    #2
    1. Advertising

  3. Jack (MVP-Networking). schrieb:
    > Hi
    > To you have a central server run RADIUS?


    yes. i have a ms ias server with ad who runnng radius.

    But the problem is, that some users have a own notebook from home and
    will connect to the network.

    But some user dont have knowlege about windows and cant run setup this
    stuff.

    So i search a way, to make a Setup for it, that the user can set up the
    radius connection over exe/script/some other tool.

    But i cant find any solution for it!

    Thomas Creutz
     
    Thomas Creutz, Feb 16, 2008
    #3
  4. Thomas Creutz

    ohadhawk

    Joined:
    Jan 6, 2010
    Messages:
    1
    There is a solution !

    Hi Thomas,

    There is a freeware that allows that: AutoIt.
    You can download it from: autoitscript.com/autoit3/downloads.shtml

    At the following thread I added quick-and-dirty sample of AutoIt scripts (can be compiled to executables) that allow exporting WZC profiles (including EAP) and importing them.
    You can manually create a valid profile, export it and then import on all of the other computers.

    The thread: autoitscript.com/forum/index.php?showtopic=91018&st=20&gopid=760331&#entry760331

    ExportXmlProfile.au3 - Autoit profile export script (can be compiled to stand-alone executable)
    Usage: ExportXmlProfile <SSID>
    Profile will be exported to <SSID>.xml
    Code:
    #CS
    13/08/2009 - Version 3.1b
    -----------------------------------------------------------------
    ----------------------NATIVE WIFI FUNCTIONS----------------------
    --------------------------For WinXP SP3--------------------------
    ----------------------------by MattyD----------------------------
    -----------------------------------------------------------------
    
    This is a quick how to...
    Check the help for a comprehensive coverage of functions!
    
    The syntax for these functions is used for back compatablity
    It is recomended that newcomers use the V3.1a functions
    
    If you are using 3rd party software to configre your connections
    this script will give windows control
    
    The connections section is commented out for sake of annoyance
    
    This script assumes you are connected when running
    #CE
    #Include "Native_Wifi_Func_V3_1b.au3"
    #include <array.au3>
    
    ;----------------------------------------------------------------
    ;Setting up the Session...
    ;----------------------------------------------------------------
    $Interfaces = _Wlan_StartSession() 	;Calls Openhandle, EnumInterfaces and SetGlobalConstants
    									;If successful it returns output from EnumInterfaces and sets @extended to the client handle
    									;SetGlobalConstants is called with the client handle and the pointer to the guid of the first interface
    									;
    									;Still confused? (Its not essential unless you wish to control a second wifi card)
    									;We can manually set up the session by:
    									;
    									;$Handle = _Wlan_OpenHandle()
    									;$Interfaces = ($Handle)
    									;_Wlan_SetGlobalConstants($Handle, $Interfaces[0][0]) (this allows -1 to be subsituted for client handle and guid pointer values in subsequent functions)
    									
    ;_ArrayDisplay($Interfaces, "Interface Array")	;$Interfaces[Interface][0] - pointer to a GUID struct 
    												;	Used for multiple wifi cards (lets functions know which adaptor to talk to)
    												;$Interfaces[Interface][1] - Adaptor name
    												;$Interfaces[Interface][2] - Connection state. Connected, Disconnected or Authenticating - Read next section for more info!
    
    
    ;----------------------------------------------------------------
    ;Adaptor related functions
    ;----------------------------------------------------------------
    _Wlan_SetInterface(-1, -1, 0, "Auto Config Enabled") ;Auto Config Enabled or Auto Config Disabled - Some 3rd party wifi managers will switch this setting off again if it wants control! 
    If @error Then ConsoleWrite("_Wlan_SetInterface1: " & $Error)
    $QI = _Wlan_QueryInterface(-1, -1, 0) ;The "use Windows to configure my wireless network settings" checkbox - Needs to be enabled for many funtions to work
    ConsoleWrite("Query Interface 0: " & $QI & @CRLF)
    If @error Then ConsoleWrite("_Wlan_QueryInterface2: " & $Error)
    	
    If $CmdLine[0] == 0 Then 
    	MsgBox(16, "ExportXmlProfile error", "Missing profile SSID argument")
    	Exit 1
    EndIf	
    
    If $CmdLine[0] > 1 Then 
    	MsgBox(16, "ExportXmlProfile error", "Incorrect number of command line arguments")
    	Exit 1
    EndIf	
    
    ; Check that the profile exists
    $wlanProfile = _Wlan_GetProfile(-1, -1, $CmdLine[1])
    If StringLeft($wlanProfile, 18) == "Element not found." Then
    	MsgBox(16, "ExportXmlProfile error", "No profile found for SSID: " & $CmdLine[1])
    	Exit 1
    EndIf
    
    ; Get the profile's XML
    $a_iCall = DllCall($WLANAPIDLL, "dword", "WlanGetProfile", "hwnd", $GLOBAL_hClientHandle, "ptr", $Interfaces[0][0], "wstr", "reg73G_rsn_eap_ccmp","ptr", 0, "wstr*", 0, "ptr*", 0, "ptr*", 0)
    If @error <> 0 Then
    	MsgBox(16, "ExportXmlProfile error", "Error getting the XML profile for SSID: " & $CmdLine[1])
    	Exit 1
    ElseIf $a_iCall[0] <> 0 Then
    	$ErrorMessage = _Wlan_GetErrorMessage($a_iCall[0])
    	MsgBox(16, "ExportXmlProfile error", "Error getting the XML profile for SSID: " & $CmdLine[1] & @CRLF & "Error (" & $a_iCall[0] & "): " & $ErrorMessage)
    	Exit 1
    EndIf
    $xmlProfile = $a_iCall[5]
    
    ; Write the profile to a file
    $fileName = $CmdLine[1] & ".xml"
    $fh = FileOpen ( $fileName , 2 )
    If $fh == -1 Then
    	MsgBox(16, "ExportXmlProfile error", "Could not write to XML file: " & $fileName)
    	Exit 1
    EndIf
    FileWrite($fh, $xmlProfile )
    FileClose($fh)
    
    MsgBox(64, "ExportXmlProfile success", "Successfully wrote the profile to: " & $fileName)
    
    _Wlan_EndSession(-1) ;Calls CloseHandle and closes the dll
    
    ImportXmlProfile.au3 - Autoit profile import script (can be compiled to stand-alone executable)
    Usage: ImportXmlProfile <profile.xml>
    Code:
    #CS
    13/08/2009 - Version 3.1b
    -----------------------------------------------------------------
    ----------------------NATIVE WIFI FUNCTIONS----------------------
    --------------------------For WinXP SP3--------------------------
    ----------------------------by MattyD----------------------------
    -----------------------------------------------------------------
    
    This is a quick how to...
    Check the help for a comprehensive coverage of functions!
    
    The syntax for these functions is used for back compatablity
    It is recomended that newcomers use the V3.1a functions
    
    If you are using 3rd party software to configre your connections
    this script will give windows control
    
    The connections section is commented out for sake of annoyance
    
    This script assumes you are connected when running
    #CE
    #Include "Native_Wifi_Func_V3_1b.au3"
    #include <array.au3>
    
    ;----------------------------------------------------------------
    ;Setting up the Session...
    ;----------------------------------------------------------------
    $Interfaces = _Wlan_StartSession() 	;Calls Openhandle, EnumInterfaces and SetGlobalConstants
    									;If successful it returns output from EnumInterfaces and sets @extended to the client handle
    									;SetGlobalConstants is called with the client handle and the pointer to the guid of the first interface
    									;
    									;Still confused? (Its not essential unless you wish to control a second wifi card)
    									;We can manually set up the session by:
    									;
    									;$Handle = _Wlan_OpenHandle()
    									;$Interfaces = ($Handle)
    									;_Wlan_SetGlobalConstants($Handle, $Interfaces[0][0]) (this allows -1 to be subsituted for client handle and guid pointer values in subsequent functions)
    									
    ;_ArrayDisplay($Interfaces, "Interface Array")	;$Interfaces[Interface][0] - pointer to a GUID struct 
    												;	Used for multiple wifi cards (lets functions know which adaptor to talk to)
    												;$Interfaces[Interface][1] - Adaptor name
    												;$Interfaces[Interface][2] - Connection state. Connected, Disconnected or Authenticating - Read next section for more info!
    
    ;----------------------------------------------------------------
    ;Adaptor related functions
    ;----------------------------------------------------------------
    _Wlan_SetInterface(-1, -1, 0, "Auto Config Enabled") ;Auto Config Enabled or Auto Config Disabled - Some 3rd party wifi managers will switch this setting off again if it wants control! 
    If @error Then ConsoleWrite("_Wlan_SetInterface1: " & $Error)
    $QI = _Wlan_QueryInterface(-1, -1, 0) ;The "use Windows to configure my wireless network settings" checkbox - Needs to be enabled for many funtions to work
    If @error Then ConsoleWrite("_Wlan_QueryInterface2: " & $Error)
    	
    _Wlan_SetInterface(-1, -1, 1, "Infrastructure Only") ;Infrastructure Only, Ad Hoc Only, or Any Available Network
    If @error Then ConsoleWrite("_Wlan_SetInterface2: " & $Error)
    $QI = _Wlan_QueryInterface(-1, -1, 1) 
    If @error Then ConsoleWrite("_Wlan_QueryInterface2: " & $Error)
    	
    
    If $CmdLine[0] == 0 Then 
    	ConsoleWrite("Error: No XML file name was supplied.")
    	Exit 1
    EndIf	
    
    If $CmdLine[0] > 1 Then 
    	ConsoleWrite("Error: Incorrect number of command line arguments")
    	Exit 1
    EndIf	
    
    If StringRegExp(StringRight($CmdLine[1], 4), "(?i)\.xml") <> 1 Then
    	ConsoleWrite('Error: Given file name is not of type: ".xml": ' & $CmdLine[1])
    	Exit 1
    EndIf
    
    ; Reading the profile from an XML file
    $fh = FileOpen ( $CmdLine[1], 0 )
    If $fh == -1 Then
    	ConsoleWrite("Error: Could not read from XML file: " & $CmdLine[1])
    	Exit 1
    EndIf
    
    $profileXml = FileRead($fh)
    FileClose($fh)
    
    ; Setting the profile
    $a_iCall = DllCall($WLANAPIDLL, "dword", "WlanSetProfile", "hwnd", $GLOBAL_hClientHandle, "ptr", $Interfaces[0][0], "dword", 0, "wstr", $profileXml, "ptr", 0, "int", 1, "ptr", 0, "dword*", 0)
    If @error <> 0 Then
    	ConsoleWrite("Error: Could not set profile from XML file: " & $CmdLine[1])
    	Exit 1
    Else		
    	If $a_iCall[0] <> 0 Then
    		$ErrorMessage = _Wlan_GetErrorMessage($a_iCall[0])
    		ConsoleWrite("Error: Could not set profile from XML file: " & $CmdLine[1] & @CRLF & "Error (" & $a_iCall[0] & "): " & $ErrorMessage)
    		Exit 1
    	EndIf
    EndIf
    
    ConsoleWrite("Success: Setting a profile from XML file: " & $CmdLine[1])
    
    _Wlan_EndSession(-1) ;Calls CloseHandle and closes the dll
    
     
    ohadhawk, Jan 6, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PingPong
    Replies:
    9
    Views:
    1,953
    Gramps
    Aug 19, 2004
  2. Truty
    Replies:
    6
    Views:
    15,015
    Truty
    May 16, 2006
  3. oliver_tiger
    Replies:
    0
    Views:
    1,258
    oliver_tiger
    Sep 20, 2006
  4. Amira EL OUDI

    WCN UFD, Question ??

    Amira EL OUDI, Apr 3, 2008, in forum: Wireless Networking
    Replies:
    2
    Views:
    792
    Lanwench [MVP - Exchange]
    Oct 25, 2008
  5. Amira EL OUDI

    WCN UFD, Question ??

    Amira EL OUDI, Apr 7, 2008, in forum: Wireless Networking
    Replies:
    2
    Views:
    489
    Pavel A.
    Apr 8, 2008
Loading...

Share This Page