Wireless Zero Configuration on XP SP2

Discussion in 'Wireless Networking' started by andrewb, Sep 7, 2005.

  1. andrewb

    andrewb Guest

    Hi,

    I am maintaining a Wireless utility for a company I work for and have a
    problem with it running on Windows XP SP2.

    The utility performs the following steps through an automated wizard :

    1. Disable Ethernet
    2. Enable Wireless
    3. Purge any previous wireless cached connection credentials (to force
    the user to re-authenticate)

    It currently uses the WZCTOOL.exe to perform step 3 but this is not
    working on SP2 - presumably because of the way that "Wireless Zero
    Configuration" is operating.

    My question is, how can I programmatically purge any previous wireless
    cached connection credentials to force the user to re-authenticate,
    while running Wireless Zero Configuration on Windows XP SP2.

    Any help would be much appreciated.

    Andrew
    andrewb, Sep 7, 2005
    #1
    1. Advertising

  2. andrewb

    andrewb Guest

    andrewb, Sep 8, 2005
    #2
    1. Advertising

  3. andrewb

    andrewb Guest

    Here's the code I ended up using. Note the "GUID" is the wireless
    adapter GUID that I an getting by using "wzctool.exe", but it would be
    pretty straight forward to get this by enumerating the
    "SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces" registry key.

    ' /*
    --------------------------------------------------------------------------------
    */

    function PurgeWZCNetworks(GUID)

    Dim Count, RegString, FINISHED, WSHShell

    Count = 0
    FINISHED = false

    on error resume next

    Set WSHShell = WScript.CreateObject("WScript.Shell")

    call WSHShell.Run("NET STOP WZCSVC", 0, true)

    do while (Not FINISHED)
    RegString = "Static#" & Right("0000" & Count, 4)
    if (Not
    DeleteRegistryValue("SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces\"
    & GUID, RegString)) then
    FINISHED = true
    end if
    loop

    call WSHShell.Run("NET START WZCSVC", 0, true)

    Set WSHShell = nothing

    end function

    ' /*
    --------------------------------------------------------------------------------
    */

    function DeleteRegistryValue(Path, Value)

    dim oReg, code

    on error resume next

    Set
    oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    code = oReg.DeleteValue(HKEY_LOCAL_MACHINE, Path, Value)

    DeleteRegistryValue = (code = 0)

    end function

    ' /*
    --------------------------------------------------------------------------------
    */
    andrewb, Sep 12, 2005
    #3
    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. Alek

    To change Wireless Zero Configuration settings

    Alek, Jun 30, 2004, in forum: Wireless Networking
    Replies:
    1
    Views:
    4,316
    Stephan Wolf [MVP]
    Jun 30, 2004
  2. andrew

    Wireless Zero Configuration Servoce fails to start

    andrew, Jul 28, 2004, in forum: Wireless Networking
    Replies:
    0
    Views:
    2,675
    andrew
    Jul 28, 2004
  3. Sleurhutje

    Wireless Zero Configuration Service problems

    Sleurhutje, Sep 22, 2004, in forum: Wireless Networking
    Replies:
    0
    Views:
    840
    Sleurhutje
    Sep 22, 2004
  4. =?Utf-8?B?SmFtZXM=?=

    Wireless Zero Configuration service not starting

    =?Utf-8?B?SmFtZXM=?=, Nov 2, 2004, in forum: Wireless Networking
    Replies:
    1
    Views:
    2,236
    Jeroen van Bemmel
    Nov 3, 2004
  5. volatile5
    Replies:
    0
    Views:
    1,385
    volatile5
    Jul 15, 2006
Loading...

Share This Page