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
V

vbTom

@vbTom
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to disable the NIC?
    V vbTom

    Thanks I order the XP DDK on CD to take a look and possibly generate a better solution than using the Devcon.exe program. In the meantime I did get this to work, its not complete but it seems to work. Of course it relies on WMI and the Devcon executable. Thanks for your help Tom Private Sub ChangeAdapterStatus(ByVal mAdapter As String, ByVal mStatus As String) Dim oMngt As New ManagementScope("\\.") ' local machine Dim oMs As New System.Management.ObjectQuery Dim oSearch As New ManagementObjectSearcher Dim oColl As ManagementObjectCollection Dim oRcd As New ManagementObject Dim oNic As PropertyData Dim oState As String Dim ret As Integer ' Try oMs.QueryString() = "SELECT NetConnectionID, NetConnectionStatus, PNPDeviceID" & _ " FROM Win32_NetworkAdapter" & _ " Where NetConnectionID = '" & mAdapter & "'" ' " Where NetConnectionID like '%'" This returns all configed adpt oSearch.Scope = oMngt oSearch.Query = oMs oColl = oSearch.Get For Each oRcd In oColl oNic = oRcd.Properties.Item("PNPDeviceID") Dim oDevHld As String = oNic.Value Dim oDevID() As String = oDevHld.Split("&") Dim oCmd As String = "\devcon.exe " & mStatus & " *" & oDevID(1) & "* updateni" ret = Shell(Application.StartupPath & oCmd) Next Catch ex As ManagementException MsgBox(ex.Message) End Try End Sub Tom

    Visual Basic sysadmin tutorial question

  • How to disable the NIC?
    V vbTom

    Thanks for the quick response. I will look into the solution you mentioned. Also I found this KB http://support.microsoft.com/?kbid=311272 it is a command line utility of the device manager which I may use as a last resort. Once again thanks. Tom

    Visual Basic sysadmin tutorial question

  • How to disable the NIC?
    V vbTom

    Hi I have been trying to find a way to do this thru WMI but do not see any methods and all properties are read only. Can you point me in the right direction I am using Win32_NetworkAdapter I searched others and am unable to find a way to do it. Any help is appreciated. Thanks Tom

    Visual Basic sysadmin tutorial question

  • Passing command line arguments to vb.net
    V vbTom

    Thanks that worked Tom

    Visual Basic csharp help question

  • Passing command line arguments to vb.net
    V vbTom

    I know this should be simple but I can't get it to work. Isn't there a way to pass command line arg's to a vb.net program without have to use the vb6 class? I search help but I must haver it installed incorrectly becuase it keeps saying it is updating my recent changes? Thanks Tom Tom

    Visual Basic csharp help question
  • Login

  • Don't have an account? Register

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