|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Win32ShutdownTracker errorsend a message to the user, I'd like to use the Win32ShutdownTracker 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.ManagementScope("\\RemoteServer\root\cimv2") scope.Options.EnablePrivileges = True scope.Connect() Dim objQuery As New System.Management.ObjectQuery("SELECT * FROM Win32_OperatingSystem") Dim objSearcher As New Management.ManagementObjectSearcher(scope, objQuery) Dim objCol As Management.ManagementObjectCollection = objSearcher.Get() Dim mo As Management.ManagementObject For Each mo In objCol Dim methodArgs As String() = {"10", "Testing...", "1", "6"} mo.InvokeMethod("Win32ShutdownTracker", methodArgs) ' Error occurrs here Console.WriteLine(mo.ToString()) Next Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical) 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 <komb***@hotmail.com> schrieb:
> I'm writing a utility to shut down remote workstations. In order to Note that this method is only supported on Windows Vista/Windows Server > send a message to the user, I'd like to use the Win32ShutdownTracker > method. However, I receive this error message: > > "This method is not implemented in any class." "Longhorn". -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Herfried,
Thanks for your reply. Can you recommend a different method to accomplish the same thing?
XML to ODBC
DataView Multiple Change String builder (Parsing vertically presented records) Programming for Touch Screens Sub Main is not waiting!!!?? Adding data to database Sending web email including resource files Enabling / Disabling Tab Pages XmlDocument object to string - plase help with unusual character! |
|||||||||||||||||||||||