Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how can i shut down my LAN? any idea

how can i shut down my LAN? any idea

Scheduled Pinned Locked Moved C#
questioncsharptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nayabsiddiqi
    wrote on last edited by
    #1

    Wondering how to disconnect my LAN through C#... though there is a way through WMI but any alternate and better solution would be appreciated ;) thanks Determination and faith are the only keys !

    L S 2 Replies Last reply
    0
    • N nayabsiddiqi

      Wondering how to disconnect my LAN through C#... though there is a way through WMI but any alternate and better solution would be appreciated ;) thanks Determination and faith are the only keys !

      L Offline
      L Offline
      Le centriste
      wrote on last edited by
      #2

      There is no keyword in C# or class/method in the .NET framework to directly achieve this. You may have to build your own, probably by using the System.Management [^] namespace in the framework, since there is way through WMI.

      ----- If atheism is a religion, then not collecting stamps is a hobby. -- Unknown God is the only being who, to rule, does not need to exist. -- Charles Baudelaire

      N 1 Reply Last reply
      0
      • L Le centriste

        There is no keyword in C# or class/method in the .NET framework to directly achieve this. You may have to build your own, probably by using the System.Management [^] namespace in the framework, since there is way through WMI.

        ----- If atheism is a religion, then not collecting stamps is a hobby. -- Unknown God is the only being who, to rule, does not need to exist. -- Charles Baudelaire

        N Offline
        N Offline
        nayabsiddiqi
        wrote on last edited by
        #3

        thanks for taking interest :) The problem is, through system.management, i can only get the status of whether the Network Card is enabled or Disabled. The solution is only if the DHCP gets unleased, but thats not the right way i guess. What I want to do is to achieve the Disabling Network Card as i use to do by going in Network connection and disabling it through right click and selecting the particular option "Disable" Any idea how to do that ?

        Determination and faith are the only keys !

        1 Reply Last reply
        0
        • N nayabsiddiqi

          Wondering how to disconnect my LAN through C#... though there is a way through WMI but any alternate and better solution would be appreciated ;) thanks Determination and faith are the only keys !

          S Offline
          S Offline
          Spacix One
          wrote on last edited by
          #4

          There are a few ways you can do this, below is the easiest method with a WMI script converted to C#; http://channel9.msdn.com/ShowPost.aspx?PostID=158556[^] If you download his application (the [Save] link at the bottom of the top post) he included the source code...

          N 1 Reply Last reply
          0
          • S Spacix One

            There are a few ways you can do this, below is the easiest method with a WMI script converted to C#; http://channel9.msdn.com/ShowPost.aspx?PostID=158556[^] If you download his application (the [Save] link at the bottom of the top post) he included the source code...

            N Offline
            N Offline
            nayabsiddiqi
            wrote on last edited by
            #5

            thanks for the reference :)

            Determination and faith are the only keys !

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups