Enable/Disable NIC  | |
August 11th, 2004, 12:36 PM
|
#1 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
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. |
| |
August 11th, 2004, 03:12 PM
|
#2 (permalink)
| | addicted
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 |
| |
August 11th, 2004, 03:20 PM
|
#3 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
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 |
| |
August 11th, 2004, 04:02 PM
|
#4 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Greenfield, MO.
Posts: 1,958
|
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?
|
| |
August 11th, 2004, 04:09 PM
|
#5 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
Will disabling the connection from there effectively do the same as disabling the device from device manager? |
| |
August 11th, 2004, 05:25 PM
|
#6 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Greenfield, MO.
Posts: 1,958
| |
| |
August 11th, 2004, 05:28 PM
|
#7 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
Ok, I'll try that the next time it hangs.
Thanks. |
| |
August 13th, 2004, 01:13 PM
|
#8 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
Nope.
Trying to disable the connection from network connections said it was in use and can't disable it. |
| |
August 13th, 2004, 01:57 PM
|
#9 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Greenfield, MO.
Posts: 1,958
|
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 02:00 PM.
|
| |
August 13th, 2004, 05:05 PM
|
#10 (permalink)
| | Retired mostly.
Join Date: Oct 2001 Location: Finland
Posts: 5,144
|
XP pro
After I did that though, I couldn't anymore even access device manager and had to reboot... |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |