Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Thu, 4 Sep 2008 11:48:28 +1000,    group: microsoft.public.win32.programmer.wmi        back       


WMI DiskQuota Class   
Hi experts,

Is the WMI DiskQuota class horribly slow for everyone, or is it just me?

It takes 45 seconds (or more) for WMI to retrieve the VolumeSpaceUsed for a 
user account on my domain, whereas DiskQuota.1 (.dll) takes less than a 
second.

This is using the demo code from Microsoft, and the query is being executed 
on a Server 2003 SP1 32-bit machine.

objwmiservice = GetObject("winmgmts:" & 
"{impersonationLevel=impersonate}!\\" & MyServer & "\root\cimv2")

        ColItems = objwmiservice.execquery(("Select * from Win32_DiskQuota 
where User='Win32_Account.Domain=""mydomain"",Name=""" & userid & """'"))

        For Each ObjItem In ColItems
        lblQuotaLimit.Text = (ObjItem.Limit / 1024) / 1024 & "Mb"
        lblQuotaUsed.Text = (ObjItem.DiskSpaceUsed / 1024) / 1024 & "Mb"
        Next

I don't want to use the .DLL file, since it won't move up to 64-bit 
platforms.

Any clues to SUBSTANTIALLY increasing the performace of retrieving (and 
setting) Disk Quotas?

Mark
date: Thu, 4 Sep 2008 11:48:28 +1000   author:   Mark B

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us