![]() Use the Win32_CDROMDrive class and the MediaLoaded property.įWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_CDROMDrive','WQL',wbemFlagForwardOnly) How do I determine if a CD is in a CD-ROM drive? Use a monitoring code that queries the Win32_VolumeChangeEvent class.įunction EventTypeStr(EventType:Integer):string įWbemObjectSet:= FWMIService.ExecNotificationQuery('SELECT * FROM Win32_VolumeChangeEvent') ![]() How do I determine when a removable drive has been added to or removed from a computer? ![]() While oEnum.Next(1, FWbemObject, iValue) = 0 do OEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant If you are using disk quotas, then use the Win32_DiskQuota class and retrieve the values of the User and DiskSpaceUsed properties.įSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator') įWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', '') įWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_DiskQuota','WQL',wbemFlagForwardOnly) How do I find out how much disk space each user is currently using on a computer?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |