Tom's Hardware > Forum > Wireless Networking > Wireless General Discussions > Wireless Zero Configuration on XP SP2

Wireless Zero Configuration on XP SP2

Forum Wireless Networking : Wireless General Discussions - Wireless Zero Configuration on XP SP2

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windows.networking.wireless (More info?)

 

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

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windows.networking.wireless (More info?)

 

Found the following post, which I think will help me out :

http://groups.google.com/group/mic [...] 12518f62c9

andrew

Reply to Anonymous

Archived from groups: microsoft.public.windows.networking.wireless (More info?)

 

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

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

Reply to Anonymous
Tom's Hardware > Forum > Wireless Networking > Wireless General Discussions > Wireless Zero Configuration on XP SP2
Go to:

There are 496 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them