Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner 2009 - Free Scan Now

resetting LAN connection metric in VISTA

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 03-01-2007
=?Utf-8?B?ZGFr?=
 

Posts: n/a
resetting LAN connection metric in VISTA
I have been using the following vbscript in XP to reset the connection metric
on my
LAN. I am having problems getting it to work in Vista. Everthing seems to run
correctly but the value is not reset (when I look at the properties of the
Local Area Connection / properities of the TCPIP and Advanced). Also if I
rerun this script the value remains the same and is not the value I am
setting it to. I am running from an admin command prompt. I am guessing the
addition of IPv6 may have added new variables and the setipconnectionmetric
may have been renamed? Any ideas?

--------------------
On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

regValueDataMetric = "35"

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapter Where NetConnectionID = 'Local Area
Connection'")

For Each objItem in colItems
strMACAddress = objItem.MACAddress
Wscript.Echo "MACAddress: " & strMACAddress
Next

Set colNetCard = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

For Each objNetCard in colNetCard
If objNetCard.MACAddress = strMACAddress Then
For Each strIPAddress in objNetCard.IPAddress
Wscript.Echo "Description: " & objNetCard.Description
Wscript.Echo "IP Address: " & strIPAddress
Wscript.Echo "IPConnectionMetric: " & objNetCard.IPConnectionMetric
objNetCard.SetIPConnectionMetric(regValueDataMetri c)
Next
End If
Next

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-08-2008
 

Join Date: Feb 2008
Posts: 1
someone is on a distinguished road
Thanks: 0
Thanked 0 Times in 0 Posts
Any luck? I've been facing a similar problem and concluded that Vista's manual metric box is broken....it forced automatic metric no matter what setting we enter in the box.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
AGE II: Conquerors Lan Play =?Utf-8?B?RG9uIFB1cnZpcw==?= microsoft.public.windows.vista.games 5 07-08-2009 10:30
Resetting passwords for Vista Home Premium =?Utf-8?B?Sm9oblA=?= microsoft.public.windows.vista.administration accounts passwords 2 03-16-2007 18:18
resetting LAN connection metric =?Utf-8?B?ZGFr?= microsoft.public.windows.vista.general 0 02-28-2007 23:07
Wireless Connection (Private) Issues with Vista =?Utf-8?B?TWlrZQ==?= microsoft.public.windows.vista.general 1 02-28-2007 20:02
Age of Empires 2 - Lan Connection Bug =?Utf-8?B?TWF0dCBNb3JlaGVhZA==?= microsoft.public.windows.vista.games 0 02-28-2007 14:08




All times are GMT +1. The time now is 19:10.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119