G
Guest
I want to know how to shut down computer using VB .NET. Thank you
* =?Utf-8?B?V29u?= said:I want to know how to shut down computer using VB .NET. Thank you
I do not know, but did you read thisbut gives me this message...."PREVILEGE NOT HELD"...Why is that?
' Verwende diesen Eigenschaften wenn es Probleme mit den Rechten gibt
'ms.Options.Password = ""
'ms.Options.Username = ""
System.Management.ObjectQuery("SELECT * FROM Win32_OperatingSystem")Nuno said:I put your code :
Dim ms As System.Management.ManagementScope = New System.Management.ManagementScope("\\LocalHost\root\cimv2")
Dim mo As System.Management.ManagementObject
ms.Options.EnablePrivileges = True
' Verwende diesen Eigenschaften wenn es Probleme mit den Rechten gibt
'ms.Options.Password = ""
'ms.Options.Username = ""
Dim oq As System.Management.ObjectQuery = New
System.Management.ManagementObjectSearcher(ms, oq)Dim query1 As System.Management.ManagementObjectSearcher = New
System.Management.ManagementObjectCollection = query1.Get()Dim queryCollection1 As