Disable Ad-Hoc connections via the command line

Discussion in 'Wireless Networking' started by mickgrove@gmail.com, Mar 8, 2006.

  1. Guest

    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\Interfaces\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ActiveSettings
    HKLM\Software\Microsoft\WZCSVC\Parameters\Interfaces\{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
    , Mar 8, 2006
    #1
    1. Advertising

  2. 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:...
    > 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\Interfaces\{57AB8439-B9F4-464A-8DD4-353EDC75E7AF}\ActiveSettings
    > HKLM\Software\Microsoft\WZCSVC\Parameters\Interfaces\{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
    >
    Carl DaVault [MSFT], Mar 15, 2006
    #2
    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. =?Utf-8?B?QXJubw==?=

    possible to disable/enable wireless network adapter via command?

    =?Utf-8?B?QXJubw==?=, Apr 26, 2005, in forum: Wireless Networking
    Replies:
    1
    Views:
    7,510
    Arkady Frenkel
    Apr 26, 2005
  2. =?Utf-8?B?Q2hyaXMgTHVrb3dza2k=?=

    How do I stop SQL services via command line?

    =?Utf-8?B?Q2hyaXMgTHVrb3dza2k=?=, May 25, 2004, in forum: MCSE
    Replies:
    25
    Views:
    18,087
  3. chuckcar
    Replies:
    11
    Views:
    9,393
    §ñühw¤£f
    Apr 21, 2009
  4. Evan Platt
    Replies:
    1
    Views:
    838
    John Holmes
    Apr 18, 2009
  5. §ñühw¤£f
    Replies:
    2
    Views:
    1,475
    §ñühw¤£f
    Apr 19, 2009
Loading...

Share This Page