Re: Win32_DiskDrive vs. MSStorageDriver

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jesse (nospam_at_nospam.com)
Date: 01/24/05

  • Next message: alexbalaev_at_yahoo.com: "Re: Security Event Logging and remote WMI connection question"
    Date: Mon, 24 Jan 2005 11:49:24 -0500
    
    

    Thanks, Peter. That did the trick.

    But I'm only getting data back from my internal drive; my external USB drive
    doesn't show up in the queries. Do I need to do something special to get
    information back from the external drive?

    Also: can you recommend a good reference for me to read that might explain
    this stuff at a very basic level? I've found some isolated examples, but
    nothing that actually explains the "big picture".

    Thanks,

    Jesse

    PS: I accidentally multi-posted this; please reply to the cross-post in
    either microsoft.public.dotnet.framework.wmi or
    microsoft.public.windowsxp.wmi. Thanks!

    "Peter Falz" <pf.ms.news@asp-solutions.de> wrote in message
    news:eNw4u2eAFHA.1292@TK2MSFTNGP10.phx.gbl...
    > Hi Jesse,
    >
    > The class "Win32_DiskDrive" is in namespace "root\cimv2".
    >
    > If you want to use the class "MSStorageDriver_FailurePredictData",
    > you have to use the namespace "root\wmi".
    >
    > HTH
    >
    > Bye
    > Peter
    >
    > "Jesse" <nospam@nospam.com> schrieb im Newsbeitrag
    news:eDw8RrCAFHA.3852@TK2MSFTNGP10.phx.gbl...
    > > Hi,
    > >
    > > Sorry for the newb question, but, well, I'm a newb when it comes to WMI.
    > >
    > > I'm trying to access SMART disk failure data using WMI from VB.NET. I've
    > > gotten basic disk info with
    > >
    > > Dim oQuery As New System.Management.ObjectQuery("select * from
    > > Win32_DiskDrive")
    > >
    > > ...but when I try
    > >
    > > Dim oQuery As New System.Management.ObjectQuery("Select * From
    > > MSStorageDriver_FailurePredictData")
    > >
    > > I get "An unhandled exception of type
    > > 'System.Management.ManagementException' occurred in
    system.management.dll
    > > Additional information: Invalid class"
    > >
    > > Can anybody tell me what I'm doing wrong?
    > >
    > > Thanks!
    > >
    > > Here's the actual code:
    > >
    > > Dim oQuery As New System.Management.ObjectQuery("Select * From
    > > MSStorageDriver_FailurePredictData")
    > > Dim oSearcher = New ManagementObjectSearcher(oQuery)
    > > Dim oReturnCollection As ManagementObjectCollection = oSearcher.Get()
    > >
    > > Dim oReturn As ManagementObject
    > > For Each oReturn In oReturnCollection
    > > ...
    > > Next
    > > --
    > >
    > >
    > >
    >
    >


  • Next message: alexbalaev_at_yahoo.com: "Re: Security Event Logging and remote WMI connection question"