Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Wireless Networking > Disable Ad-Hoc connections via the command line

Reply
Thread Tools

Disable Ad-Hoc connections via the command line

 
 
mickgrove@gmail.com
Guest
Posts: n/a
 
      03-08-2006
DISCLAIMER: I also posted this message at
"microsoft.public.win32.programmer.networks ", but was recommended
to post here as well.


I need to ONLY allow infrastructure wireless connections on Windows XP
(sp1 and higher) laptops throughout our enterprise. Using Group Policy
is not an option due to political reasons.

Is there a way, via the command line, script, or programmatically to
set wireless connections/profiles to ONLY use infrastructure networks?

>From what I understand, this would likely need to be done on a per user

basis, but that is not a problem to do so in our environment.

I've been doing some monitoring on the actual changes that take place
when changing this setting via the GUI (using regmon). I've noticed
that registry keys are being modified by "svchost.exe" at the following
locations:

HKLM\Software\Microsoft\WZCSVC\Parameters\Interfac es\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ActiveSettings
HKLM\Software\Microsoft\WZCSVC\Parameters\Interfac es\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ControlFlags

*** Note that {57AB8439-B9F4-464A-8DD4-353EDC75E7AF} is the device id
of my wireless card

I believe that the "svchost.exe" is making api calls to "wzcsapi.dll"
to accomplish the changes, however I have been unable to pinpoint which
functions it is calling. Vieweing "wzcsapi.dll" with depends.exe
(www.dependencywalker.com), I was able to see the functions available,
but I don't know which ones to call, or how to call them.

The only documentation on MSDN regarding this file relates to WinCE. If
anyone has any suggestions or ideas, I'd really like to hear them.

One other thing, I have been looking at Zwlancfg, which works for
creating new profiles, but not changing the connection type on existing
ones. I know this tool only works on sp2, but that could still work for
me.

Thanks

 
Reply With Quote
 
 
 
 
Carl DaVault [MSFT]
Guest
Posts: n/a
 
      03-15-2006

Hi. I saw you didn't get a reply to this here, so I'd like to say... have
you tried the beta of our new OS yet? : )

In the latest preview releases there's a new driver model (for driver
developers) and it looks like we'll have a real API for manipulating
wireless connections.

For non-programmers, there are also a new netsh context for manipulating
wireless settings.

However, for downlevel OS's... since you can't use group policy,
manipulating the registry might end up being effective, but as usual, that
track is pretty much an unsupported and at-your-own risk kind of activity.

Thx!

--
Standard Disclaimers -
This posting is provided "AS IS" with no warranties,
and confers no rights. Please do not send e-mail directly
to this alias. This alias is for newsgroup purposes only.


<> wrote in message
news: oups.com...
> DISCLAIMER: I also posted this message at
> "microsoft.public.win32.programmer.networks ", but was recommended
> to post here as well.
>
>
> I need to ONLY allow infrastructure wireless connections on Windows XP
> (sp1 and higher) laptops throughout our enterprise. Using Group Policy
> is not an option due to political reasons.
>
> Is there a way, via the command line, script, or programmatically to
> set wireless connections/profiles to ONLY use infrastructure networks?
>
>>From what I understand, this would likely need to be done on a per user

> basis, but that is not a problem to do so in our environment.
>
> I've been doing some monitoring on the actual changes that take place
> when changing this setting via the GUI (using regmon). I've noticed
> that registry keys are being modified by "svchost.exe" at the following
> locations:
>
> HKLM\Software\Microsoft\WZCSVC\Parameters\Interfac es\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ActiveSettings
> HKLM\Software\Microsoft\WZCSVC\Parameters\Interfac es\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ControlFlags
>
> *** Note that {57AB8439-B9F4-464A-8DD4-353EDC75E7AF} is the device id
> of my wireless card
>
> I believe that the "svchost.exe" is making api calls to "wzcsapi.dll"
> to accomplish the changes, however I have been unable to pinpoint which
> functions it is calling. Vieweing "wzcsapi.dll" with depends.exe
> (www.dependencywalker.com), I was able to see the functions available,
> but I don't know which ones to call, or how to call them.
>
> The only documentation on MSDN regarding this file relates to WinCE. If
> anyone has any suggestions or ideas, I'd really like to hear them.
>
> One other thing, I have been looking at Zwlancfg, which works for
> creating new profiles, but not changing the connection type on existing
> ones. I know this tool only works on sp2, but that could still work for
> me.
>
> Thanks
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lingering Idle Oracle Connections? Persistent connections? jobs ASP .Net 2 11-16-2007 03:37 AM
Set default framework version for a web site via the command line RedEye ASP .Net 2 09-07-2005 12:17 AM
possible to disable/enable wireless network adapter via command? =?Utf-8?B?QXJubw==?= Wireless Networking 1 04-26-2005 12:39 PM
Compile ASP.NET via command line =?Utf-8?B?S2V2aW4=?= ASP .Net 1 06-14-2004 06:18 AM
How do I stop SQL services via command line? =?Utf-8?B?Q2hyaXMgTHVrb3dza2k=?= MCSE 25 05-25-2004 06:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57