+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150

    Enable/Disable NIC

    I have an annoying problem.

    The nic I have wants every now and then lock itself up, refusing to work at all.
    If then I go to device manager, disable and enable it, it will work again.

    How would I go about making something that will with single click disable/enable it? Now I need to open up device manager, browse to the device and then disable/enable it.
    --edit--
    Or, to be even cooler, don't nics send stuff around to see if anyones alive or something? Would it be possible to tell it that if noone responds, disable/enable yourself?
    --end edit--

    Or, if someone would how to repair it, that would be good, too.

    The nic is integrated, 'VIA Rhine II Fast Ethernet Adapter'.
    Drivers are WHQL ver 3.32.0.417.

  2. #2
    addicted DVNT1's Avatar
    Join Date
    Oct 2001
    Location
    Ohio
    Posts
    6,103
    if XP then this might work for you...
    Code:
    '======== ToggleLanConnection.vbs========
    
    Const ssfCONTROLS = 3
    
    sConnectionName = "Local Area Connection"
    
    sEnableVerb = "En&able"
    sDisableVerb = "Disa&ble"
    
    set shellApp = createobject("shell.application")
    set oControlPanel = shellApp.Namespace(ssfCONTROLS)
    
    set oNetConnections = nothing
    for each folderitem in oControlPanel.items
      if folderitem.name  = "Network and Dial-up Connections" then
        set oNetConnections = folderitem.getfolder: exit for
      end if
    next
    
    if oNetConnections is nothing then
      msgbox "Couldn't find 'Network and Dial-up Connections' folder"
      wscript.quit
    end if
    
    set oLanConnection = nothing
    for each folderitem in oNetConnections.items
      if lcase(folderitem.name)  = lcase(sConnectionName) then
        set oLanConnection = folderitem: exit for
      end if
    next
    
    if oLanConnection is nothing then
      msgbox "Couldn't find '" & sConnectionName & "' item"
      wscript.quit
    end if
    
    bEnabled = true
    set oEnableVerb = nothing
    set oDisableVerb = nothing
    s = "Verbs: " & vbcrlf
    see http://groups.google.com/groups?thre...%40tkmsftngp05

  3. #3
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150
    Since I don't understand a bit what happens in that script, I'm afraid to change it.

    So, it tells me that no such folder as 'Network and Dial-Up Connections', which is true, because the folder is called 'Network Connections'.

    Can I safely replace every instance of 'network and dialup connections' with 'network connections'?

    Thanks dvnt1

  4. #4
    Ultimate Member Underclocked's Avatar
    Join Date
    Oct 2001
    Location
    Greenfield, MO.
    Posts
    1,963
    z,sr s djptyiv ====oops, sorry, trying to get used to this derned keyoard.

    Just make a shortcut to the nic's connection on the desktop. Right click the shortcut.
    WHUT?

  5. #5
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150
    Will disabling the connection from there effectively do the same as disabling the device from device manager?

  6. #6
    Ultimate Member Underclocked's Avatar
    Join Date
    Oct 2001
    Location
    Greenfield, MO.
    Posts
    1,963
    same
    WHUT?

  7. #7
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150
    Ok, I'll try that the next time it hangs.
    Thanks.

  8. #8
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150
    Nope.
    Trying to disable the connection from network connections said it was in use and can't disable it.

  9. #9
    Ultimate Member Underclocked's Avatar
    Join Date
    Oct 2001
    Location
    Greenfield, MO.
    Posts
    1,963
    HuH???? What OS is this? I have exactly what I described to you on my desktop and I renamed the shortcut to simply LAN. A right click and disable on that shortcut disables the connection and the NIC in the device manager. I just did it in the midst of typing this posting. XP Pro on mine.
    Last edited by Underclocked; August 13th, 2004 at 01:00 PM.
    WHUT?

  10. #10
    Retired mostly.
    Join Date
    Oct 2001
    Location
    Finland
    Posts
    5,150
    XP pro

    After I did that though, I couldn't anymore even access device manager and had to reboot...

Quick Reply Quick Reply

If you are already a member, please login above.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. nic cards different from onboard?
    By munkeyboy123 in forum Networking and Internet
    Replies: 1
    Last Post: April 10th, 2004, 12:19 AM
  2. BLUE SCREENS with random errors
    By c0mputa_n3rd in forum Technical Support
    Replies: 1
    Last Post: October 29th, 2003, 11:23 PM
  3. 3 PC's phone line networking Q&A
    By DPA in forum Networking and Internet
    Replies: 5
    Last Post: May 10th, 2003, 11:52 PM
  4. Help with wireless LAN
    By nemmers in forum Networking and Internet
    Replies: 17
    Last Post: March 19th, 2003, 02:05 PM
  5. Installing Additional NICs in 98se
    By joker00 in forum Networking and Internet
    Replies: 3
    Last Post: December 15th, 2002, 02:32 PM

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright 2014 All Enthusiast, Inc