Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


hikerguy

Member
  • Content Count

    2
  • Donations

    $0.00 
  • Joined

  • Last visited

Everything posted by hikerguy

  1. Thanks gunsmokingman, after a little messing around I settled on a mix of both. I figure I might as well make an attempt to get information if there's a work-around (I'm anal like that): '/ -> workaround for [url="http://support.microsoft.com/kb/894569"]http://support.microsoft.com/kb/894569[/url] If objItem.L2CacheSize = 0 Then Exit For Else Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Size " & vbTab & objItem.L2CacheSize C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Speed " & vbTab & objItem.L2CacheSpeed & " MHZ" C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" End If Next If objItem.L2CacheSize = 0 Then '/-----------------------------------------------------------------------> Set colItems = ObjWMI.ExecQuery("SELECT Description, MaxCacheSize, CacheSpeed FROM Win32_CacheMemory", "WQL", WmiVar) '/-----------------------------------------------------------------------> Dim Ln Ln = 1 For Each objItem In colItems Ts.WriteLine "Line" & C1 & "=" & S_3 & "L" & Ln & " " & objItem.Description & vbTab & objItem.MaxCacheSize C1 = C1 +1 If Not IsNull(objItem.CacheSpeed) Then Ts.WriteLine "Line" & C1 & "=" & S_3 & "L" & Ln & " Cache Speed " & vbTab & objItem.CacheSpeed Else Ts.WriteLine "Line" & C1 & "=" & S_3 & "L" & Ln & " Cache Speed " & vbTab & "No Information" End If C1 = C1 +1 Ln = Ln +1 Ts.WriteLine "Line" & C1 & "=" Next End If And on the same machine, this yields: Line23= « CPU INFORMATION » Line24= Manufacturer GenuineIntel Line25= CPU Name Intel® Pentium® 4 CPU 2.80GHz Line26= Description x86 Family 15 Model 4 Stepping 1 Line27= Processor Speed 2794 MHZ Line28= L1 Cache Memory 16 Line29= L1 Cache Speed No Information Line30= Line30= L2 Cache Memory 1024 Line31= L2 Cache Speed No Information
  2. Felix, since I build/modify boxes on the side, I've been looking for something exactly like this. It's really great but I have a challenge for you. I tried using it on this upgrade I was doing and came across the problem described in "The L2CacheSize property of the Win32_Processor WMI class may not be populated correctly on specific types of processors". I tried this hack: '/-----------------------------------------------------------------------> Set colItems = ObjWMI.ExecQuery("SELECT * FROM Win32_Processor", "WQL", WmiVar) '/-----------------------------------------------------------------------> For Each objItem In colItems C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & TitleL & "CPU INFORMATION" & TitleR C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "Manufacturer " & vbTab & objItem.Manufacturer C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "CPU Name " & vbTab & objItem.Name C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "Description " & vbTab & objItem.Description C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "Processor Speed " & vbTab & objItem.CurrentClockSpeed & " MHZ" C1 = C1 +1 '/-> workaround for [url="http://support.microsoft.com/kb/894569"]http://support.microsoft.com/kb/894569[/url] If IsNull (objItem.L2CacheSpeed) Then Exit For Else Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Size " & vbTab & objItem.L2CacheSize C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Speed " & vbTab & objItem.L2CacheSpeed & " MHZ" C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" End If Next If IsNull (objItem.L2CacheSpeed) Then Set colItems = ObjWMI.ExecQuery("SELECT * FROM Win32_CacheMemory", "WQL", WmiVar) For Each objItem In colItems Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Size " & vbTab & objItem.MaxCacheSize C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" & S_3 & "L2 Cache Speed " & vbTab & objItem.CacheSpeed & " MHZ" C1 = C1 +1 Ts.WriteLine "Line" & C1 & "=" Next End If But came up with a slight problem. As you see, the workaround reports both L1 & L2 but the cache speed doesn't get reported at all. Line23= « CPU INFORMATION » Line24= Manufacturer GenuineIntel Line25= CPU Name Intel® Pentium® 4 CPU 2.80GHz Line26= Description x86 Family 15 Model 4 Stepping 1 Line27= Processor Speed 2794 MHZ Line28= L2 Cache Size 16 Line29= L2 Cache Speed MHZ Line30= Line30= L2 Cache Size 1024 Line31= L2 Cache Speed MHZ I am not going to pretend to understand WMI & VB as well as you and the other contributors do. Got a workaround? I'd appreciate it.
×
×
  • Create New...