
Detecting Internet connection Speed using WMI? |
Post Reply
|
| Author | |
msn_user
I'm new here
Joined: 10 Aug 2009 Online Status: Offline Posts: 3 |
Quote Reply
Topic: Detecting Internet connection Speed using WMI?Posted: 10 Aug 2009 at 18:31 |
|
Hi
I wanted to know what is the best way to know the internet connection type/Speed of the user?
I tried couple of things like using following code
strServer = "."
Set objWMI = GetObject("winmgmts://" & strServer & "/root\WMI") Set objInstances = objWMI.InstancesOf("MSNdis_LinkSpeed",48) On Error Resume Next For Each objInstance in objInstances With objInstance WScript.Echo .Active WScript.Echo .InstanceName WScript.Echo .NdisLinkSpeed End With On Error Goto 0 Next I get RPC Server not available?
|
|
![]() |
|
jvierra
MVP
Joined: 31 Aug 2006 Location: United States Online Status: Offline Posts: 6846 |
Quote Reply
Posted: 10 Aug 2009 at 21:44 |
|
It looks like you have issues with WMI on your PC.
Go to Microsoft Downloads and download WMIDiag and follow the instuctions in the included documents.
|
|
![]() |
|
msn_user
I'm new here
Joined: 10 Aug 2009 Online Status: Offline Posts: 3 |
Quote Reply
Posted: 11 Aug 2009 at 15:00 |
|
I get invalid name space when i use the following js code:
var locator = new ActiveXObject("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("\root\WMI"); var properties = service.ExecQuery("SELECT * FROM MSNdis_LinkSpeed"); var e = new Enumerator(properties); var p; for (; !e.atEnd(); e.moveNext()) { p = e.item(); } processorInfo = p.NdisLinkSpeed; any reasons? I am trying to find the connection speed in XP machine? if there is any better way to detect can any of you share the logic? Thanks in Advance..
MSN
|
|
![]() |
|
jvierra
MVP
Joined: 31 Aug 2006 Location: United States Online Status: Offline Posts: 6846 |
Quote Reply
Posted: 11 Aug 2009 at 15:17 |
|
Opps:
You changed languages. You started with vbscript and switched to JScript.
Here:
Edited by jvierra - 11 Aug 2009 at 15:27 |
|
![]() |
|
msn_user
I'm new here
Joined: 10 Aug 2009 Online Status: Offline Posts: 3 |
Quote Reply
Posted: 13 Aug 2009 at 18:00 |
|
It worked fine..Thanks for quick reply.
|
|
![]() |
|
nivetha
I'm new here
Joined: 07 Oct 2009 Online Status: Offline Posts: 1 |
Quote Reply
Posted: 07 Oct 2009 at 20:49 |
|
You can find the internet speed through the site http://www.ip-details.com/
|
|
![]() |
|
jvierra
MVP
Joined: 31 Aug 2006 Location: United States Online Status: Offline Posts: 6846 |
Quote Reply
Posted: 07 Oct 2009 at 21:42 |
|
nivetha - that is not the question that was asked. It is not a scripted answer.
I don't yhink you intended this but Ihat website is also known as a source of malware. It tries to install an ActiveX control that may be used for inserting trojans.
It does NOT give you the connection speed of a network card.
Edited by jvierra - 07 Oct 2009 at 21:44 |
|
![]() |
|
daluu
I'm new here
Joined: 11 Apr 2010 Online Status: Offline Posts: 6 |
Quote Reply
Posted: 12 Apr 2010 at 00:28 |
|
Does that work for modem/dialup connections?
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |