T
teejayem
Hi.
Hopefully somebody out there will be able to help me!
I am using VB.Net and I am trying to find out logical disk
information.
I would like to be able to find the drive letters of any logical
disks, the size of each partition and how much free space is available
on the partition.
I have used the following code to list automatic services using WMI
Public Function GetAutoServices(ByVal Server As String) As
Collection
Dim colServices
Dim objService As Object
Dim colTemp As New Collection
Try
colServices = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" _
& Server & "\root\cimv2").ExecQuery("Select * from
Win32_Service")
For Each objService In colServices
If objService.StartMode = "Auto" Then
colTemp.Add(New Service(objService.DisplayName,
objService.State))
End If
Next
Return colTemp
Catch ex As Exception
MessageBox.Show(ex.Message)
Return colTemp
End Try
End Function
is it possible to find out the info i want using this method?
Hopefully somebody out there will be able to help me!
I am using VB.Net and I am trying to find out logical disk
information.
I would like to be able to find the drive letters of any logical
disks, the size of each partition and how much free space is available
on the partition.
I have used the following code to list automatic services using WMI
Public Function GetAutoServices(ByVal Server As String) As
Collection
Dim colServices
Dim objService As Object
Dim colTemp As New Collection
Try
colServices = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" _
& Server & "\root\cimv2").ExecQuery("Select * from
Win32_Service")
For Each objService In colServices
If objService.StartMode = "Auto" Then
colTemp.Add(New Service(objService.DisplayName,
objService.State))
End If
Next
Return colTemp
Catch ex As Exception
MessageBox.Show(ex.Message)
Return colTemp
End Try
End Function
is it possible to find out the info i want using this method?