CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2003
    Location
    St. Cugat - Catalunya
    Posts
    441

    [SOLVED] How to disable a LAN connection?

    Is there any way to emulate the enable/disable button of the Status connection window for a LAN?

    In other words, I have a PC connected via Ethernet+router to Internet and I want to disconnect it for a period and then connect it again.

    I searched in MSDN but all I found was RasDialUp/RasHangUp for dial up connections. I'm not able to find anything on LAN connections.

    Thanks
    Last edited by DeepButi; December 30th, 2007 at 10:07 AM.
    Did it help? rate it.

    The best conversation I had was over forty million years ago ... and that was with a coffee machine.

  2. #2
    Join Date
    May 2004
    Posts
    23

    Re: How to disable a LAN connection?

    You want to disable from the desktop or from the code. If from the desktop, go to nettowk neighbourhood icon , right click . You can see local area connection. just right click and disable lan connection.
    Sapp

  3. #3
    Join Date
    Dec 2003
    Location
    St. Cugat - Catalunya
    Posts
    441

    Re: How to disable a LAN connection?

    sapp,
    I want to disable it from code.

    Thanks
    Did it help? rate it.

    The best conversation I had was over forty million years ago ... and that was with a coffee machine.

  4. #4
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: How to disable a LAN connection?

    I guess you could with the console... If you can send commands to the console you could always ipconfig and then /release the adapter you want.
    Nicolas Bohemier

  5. #5
    Join Date
    Mar 2005
    Posts
    1

    Thumbs up Re: How to disable a LAN connection?


  6. #6
    Join Date
    Dec 2003
    Location
    St. Cugat - Catalunya
    Posts
    441

    Re: How to disable a LAN connection?

    Any help on translating this nice script code to VB code?

    Problems come back, always come back!
    Did it help? rate it.

    The best conversation I had was over forty million years ago ... and that was with a coffee machine.

  7. #7
    Join Date
    Oct 2005
    Location
    Islamabad, Pakistan
    Posts
    1,277

    Re: How to disable a LAN connection?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured