Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows Scripts and Batch Files .: VBScript to change network card speed and duplex setting?

VBScript to change network card speed and duplex setting?

This change the network settings to 100/Half. The setting, 3 in this case, was found by manually changing it and then checking
the registry entry.

It doesn't use WMI but might be of some use..

************************************************************************************************

On Error Resume Next
Set shell = CreateObject("wscript.shell")
Dim strRegKey, strregVal, strDone
strDone = "No"
for i = 1 to 20
  strRegVal = ""
  strRegKey =
"HKLM\System\CurrentControlSet\Control\Class\{4d36E972-E325-11CE-BFC1-08002­bE10318}\000"
& i
  strRegVal = shell.RegRead(strRegKey & "\DriverDesc")
  if strRegVal = "" then
     i = 1000
  else
     Select Case strRegVal
        Case "Intel(R) PRO/100 VM Network Connection"
           shell.RegWrite strRegKey & "\SpeedDuplex", 3
           strDone = "Yes"
        Case "Intel(R) PRO/100 VE Network Connection"
           shell.RegWrite strRegKey & "\SpeedDuplex", 3
           strDone = "Yes"
        Case "Intel(R) PRO/1000 MT Network Connection"
           shell.RegWrite strRegKey & "\SpeedDuplex", 3
           strDone = "Yes"
     End Select
  end if
next
if strDone = "Yes" then
   msgbox "Your network adapter has been set to 100 Mbps Half duplex."
else
   msgbox "Unable to set network adapter speed."
end if

Note: "HKLM\System\CurrentControlSet\Control\Class\{4d36E972-E325-11CE-BFC1-08002­bE10318}\000" is the regisrty entry for a given perticuler network adapter.

Please change the entry according to your network adaper details.


How helpful was this article to you?

Related Articles

article What are the network setting required to join computer to the domain
In order to be able to join a Windows 2000...

(No rating)  4-17-2008    Views: 137   
article VBScript to List Network Shares
This script will interrogate the operating...

(No rating)  5-1-2008    Views: 138   
article VBScript to List Network Shares with InputBox
Instructions for displaying a list of a...

(No rating)  5-1-2008    Views: 119   

User Comments

Add Comment
No comments have been posted.