Click to See Complete Forum and Search --> : [RESOLVED] Remote machine hard drive free space
remya1000
05-28-2007, 10:02 PM
how can i find out the hard drive free space of remote machine.
for eg: need to find out the C drive's free space in remote machine.
any idea how can we find out this... if you have anyidea how to find out this, please help me. i just checked in internet, but didnt get any help.
not getting any idea now...
thanks in advance
CrazyMerlin
05-30-2007, 03:46 AM
not sure how you would do it directly without setting up some kind of remote access, which you could do given the correct permissions.
but one way to do this would be to build an asp page that reports any system stats that you need. Have the asp file on the hd you want to analyze, and call it using HTTP POST. The file could then echo back it's findings.
You could do this in any server side language, depending on what the remote server is running software wise.
Ribeyed
06-01-2007, 04:14 AM
Hi,
there was a question like this a few weeks ago in this forum. It was about accessing services on another machine. Have a look into the WMI class.
remya1000
06-03-2007, 09:53 PM
heah its working....
thanks a lot... i checked the link..... and code that works is this....
Dim processHandle As UInt64
Dim freespace As Integer
Dim query As New ObjectQuery("SELECT * FROM Win32_LogicalDisk Where Name='C:'")
Dim searcher As New ManagementObjectSearcher(query)
For Each queryObj As ManagementObject In searcher.Get()
processHandle = queryObj("FreeSpace")
freespace = processHandle.ToString / 1073741824
messagebox.show(freespace)
Next
now its working.
Thanks a lot for your help. really thanks...