Ok I see "Win32_Product", this is indeed a slow operation when executed the
first time.
WMI first retrieves a basic list of the installed products (using MSI), from
the "msi install server", and uses each item in the list to scan the
registry for product details, for this WMI has to map large portions of the
registry and that takes time. Once the services are running and the registry
portions are mapped the query returns somewhat faster, but this isn't of
great help of course.
I really don't see a way to speed up these queries the way it's designed.
Willy.
"Steve Teeples" <St**********@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Win32_Product.
I used the wbemtest.exe tool also just to see if my code somehow was
slowing
it down and I see the same results with it. If you pull up all instances
of
Win32_Product (I have 38 apps installed) it takes about 30 seconds for the
call to return. I'm iterating through many Win32_xxx classes and some of
these cause a massive delay in my app. I'm hoping to avoid the delay.
--
Steve
"Steve Teeples" wrote:
I am calling the method GetInstances() within the ManagementClass. I
have 48
applications on my system. Mearly calling the routine takes 28 seconds
for
it to return. I don't understand why this method would take so long to
execute. I've tried setting the EnumerationOptions.EnumerateDeep to
false
but it doesn't seem to have any impact on the time. Can someone tell me
how
to speed up the execution of this method?
--
Steve