function quotaUser($drive,$user,$type,$set)
dim $guota
if not exist($drive) exit 3 endif
$quota = CreateObject("microsoft.diskquota.1")
if 9<>vartype($quota) exit 120 endif
$quota.initialize($drive,$set)
$quota=$quota.findUser($user)
if @error exit 87 endif
select
case 1=$type $quotauser=$quota.used
case 2=$type $quotauser=$quota.quotalimit
case 3=$type $quotauser=$quota.quotalimittext
case 4=$type $quotauser=$quota.QuotaThreshold
endselect
endfunction

"your quotalimit is " quotauser("U:\",@sid,3,0)
"and you have used " quotauser("U:\",@sid,1,0)

can't seem to find the quota entries.
the U:\ drive i have stated is a mapped drive on \\server\home\%username%

am i missing something here?


Edited by otf (2004-04-21 06:39 PM)