Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CIFS Free Space Issue 1

Status
Not open for further replies.
I've had something similar once or twice with drives I NFS export. I have taken them down for maintenance (poolverify) but not found anything and the problem always clears itself up. I originally thought it was an issue w/purgable space but it never adds up correctly that way either. Not sure if it's a windows issue or an NSS issue.
 
Here is the ASP I came up with.
Problem is that the IIS IUSR_MachineName needs to be a member of the Admins group.

Bad for security?
Yep.
Why needed?
WMI calls are made as Admin de le boxen.
Bummer.

<%
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
Response.Write objDisk.DeviceID & " Free Disk Space: " & objDisk.FreeSpace & "<br>"
Next
%>




George Walkey
Senior Geek in charge
 
Seems like WSH and WMI freespace calls dont work for network drives. Thanks MS.

At this point im going to EXEC a batch file that runs
DIR > THIS_IS_INSANE.TXT
and scarf out the freespace number on the last line.....

dumb?
dumb....


George Walkey
Senior Geek in charge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top