Slow System.Managment

  • Thread starter Thread starter Josip Medved
  • Start date Start date
J

Josip Medved

When I invoke System.Managment in following manner:

moSearch = New System.Managment.ManagmentObjectSearcher("SELECT * FROM
Win32_BIOS")
moReturn = moSearch.Get

I get result after few seconds on most of machines (P3 is the weakest). Is
there any
way to speed up this? It is frustrating when you need to query few
objects...
 
Please post your code, this looks like there's something really wrong, I
clocked it at 140msec on a 1GHz PIII and less than 60 msec on a 2.6 Ghz PIV.
Also mention your System characteristics and OS version.

Willy.
 
Please post your code, this looks like there's something really wrong, I
clocked it at 140msec on a 1GHz PIII and less than 60 msec on a 2.6 Ghz
PIV.

Dim moSearch As System.Managment.ManagmentObjectSearcher
Dim moReturn As System.Managment.ManagmentObjectCollection
Dim moItem As System.Managment.ManagmentObject

moSearch = New System.Managment.ManagmentObjectSearcher _
("SELECT * FROM Win32_BIOS")
moReturn = moSearch.Get
For Each moItem In moReturn
MessageBox.Show( moItem("SerialNumber").ToString)
Next
Also mention your System characteristics and OS version.

P4 2.6, RAM 512 MB, XP
 
Ran your code, and noticed the same timings (400msec first run after
compile, all others ~70 msec).

Willy.
 
Back
Top