TWmiDiskQuotaControl is a part of
WmiSet Component Collection for Delphi, C++Builder.
It controls how much space the user can occupy on a disk with NTFS file system.
The VCL component uses the features implemented in Windows XP or higher
operating systems. It will not work on Windows 2000 or older OSes.
The component works at the two levels:
It can changes settings for a logical drive. This will
affect all the users who accesses the drive. Use QuotaSettings
property to change default disk usage limit, default warning
limit, as well as actions taken when the user reaches/exceeds the
limit.
It can customize the quotas of individual users to have
different values than default settings for a logical drive.
Code example.
This code assumes that TWmiDiskQuotaControl component was dropped
on the form at design time. The code enforces disk quotas on drive
C: and sets the default disk quota to 500 Mb.
This demo program is written using TWmiDiskQuotaControl
component. It implements disk quota manager that is capable
of managing disk quotas on the network computers. This demo
requires Windows XP, or Server 2003 or higher operating system.
Download WmiSet to
see the source code of the demo application. You may also
download executable here.