Adding adapters to a bridge using a script...

Discussion in 'Windows Vista Drivers' started by Kevin, May 24, 2007.

  1. Kevin

    Kevin Guest

    I need to add adapters to a bridge using a script.

    I can enable/disable the bridge using devcon, and tweak some settings
    using netsh, but how to remove and add an adapter to the bridge?

    The problem is that when we add and remove our virtual bridge to the
    adapter, the MAC address always goes to the same number (AA-BB-CC-DD-
    EE-01), unless we do a strange dance - remove the virtual adapter,
    disable the adapter, enable the adapter, add the adapter. Of course
    when we reboot, it reverts back to the AA-BB-CC-DD-EE-01 again, and
    then we need to do the dance.

    So, we just need a script that does the dance for us. Adding and
    removing the adapter.

    I looked for INetCfg interface and the BINDVIEW sample in the DDK (or
    NETCFG in earlier DDKs), but I don't have a DDK.

    Kevin, May 24, 2007
    1. Advertisements

  2. Kevin

    Kevin Guest

    I managed to find an INetCfg example here:

    This has some example code in VB which is supposed to do something
    useful, but this does not execute when I put it into a .vbs script. I
    just get a syntax error on line 3.
    Kevin, May 24, 2007
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.