Win32ShutdownTracker error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kombu67@hotmail.com

    #1

    Win32ShutdownTracker error

    I'm writing a utility to shut down remote workstations. In order to
    send a message to the user, I'd like to use the Win32ShutdownTr acker
    method. However, I receive this error message:

    "This method is not implemented in any class."

    Here's my code:

    Try

    Dim scope As New
    Management.Mana gementScope("\\ RemoteServer\ro ot\cimv2")

    scope.Options.E nablePrivileges = True
    scope.Connect()

    Dim objQuery As New System.Manageme nt.ObjectQuery( "SELECT *
    FROM Win32_Operating System")
    Dim objSearcher As New
    Management.Mana gementObjectSea rcher(scope, objQuery)
    Dim objCol As Management.Mana gementObjectCol lection =
    objSearcher.Get ()
    Dim mo As Management.Mana gementObject

    For Each mo In objCol

    Dim methodArgs As String() = {"10", "Testing... ", "1", "6"}

    mo.InvokeMethod ("Win32Shutdown Tracker", methodArgs) ' Error
    occurrs here
    Console.WriteLi ne(mo.ToString( ))

    Next

    Catch ex As Exception
    MsgBox(ex.Messa ge, MsgBoxStyle.Cri tical)
    End Try

    I assume that the problem lies in methodArgs, but can't figure out what
    it might be. The Win32Shutdown method works without a problem (in that
    case, methodArgs = {"6", "0"}).

    Thanks in advance!

    Kombu

  • Herfried K. Wagner [MVP]

    #2
    Re: Win32ShutdownTr acker error

    <kombu67@hotmai l.com> schrieb:[color=blue]
    > I'm writing a utility to shut down remote workstations. In order to
    > send a message to the user, I'd like to use the Win32ShutdownTr acker
    > method. However, I receive this error message:
    >
    > "This method is not implemented in any class."[/color]

    Note that this method is only supported on Windows Vista/Windows Server
    "Longhorn".

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • kombu67@hotmail.com

      #3
      Re: Win32ShutdownTr acker error

      Herfried,

      Thanks for your reply. Can you recommend a different method to
      accomplish the same thing?

      Comment

      Working...