WMI (Windows Management Instrumentation) dedikleri..
Posted by: Faruk Enes in delphi, genelNedir bu WMI ? Kısacası WMI işletim sisteminin pek çok çevresel aygıtına ulaşmak için kullanılan sınıflar bütünüdür.WMI ile işletim sistemi hemen hemen her türlü cihaz bilgisine, çalışan uygulamalar bilgisine, hatta BIOS bilgilerine bile çok kolay bir şekilde erişebilirsiniz. WMI ile neler yapabileceğinize dair link’i verdikten sonra uygulamamıza başlayalım. Örneğimde Win32_Classes kısmındaki bazı sınıfları kullandım. Aslında önemli olan birazdan yazacağım uygulamanın kodları olmayacak, önemli olan erişim mantığını anlayabilmek dolayısı ile benim vereceğim 13 adet sınıf bilgisini sizler istediğiniz gibi çoğaltabilirsiniz. Uygulamamda ;
Bios bilgileri(Win32_BIOS),
Desktop bilgileri(Win32_Desktop),
Environment bilgileri(Win32_Environment),
Partition bilgileri(Win32_DiskPartition),
Sistemde yüklü codeclerin bilgileri(Win32_CodecFile),
Boot Configuration bilgileri(Win32_BootConfiguration),
Computer System bilgileri(Win32_ComputerSystem),
İşletim sistemi bilgileri(Win32_OperatingSystem),
Çalışan process bilgileri(Win32_Process),
Servis bilgileri(Win32_Service),
Klavye bilgileri(Win32_Keyboard),
Fan bilgileri(Win32_Fan) ve CD-Rom bilgilerini(Win32_CDROMDrive) almaya çalışacağız.
İlgili linkleri takip ederseniz eğer bu class’ların kendilelerine has üye özelliklere sahip olduklarını ve Microsoft tarafından bunların detaylı bir şekilde ne amaca hizmet ettiklerini görebileceksiniz. Biz bu sınıflara erişmek için, System.Managament isim alanı içerisindeki ManagementObjectSearcher ve ManagementObject sınıflarını kullanacağız.
Tasarımımı her bir class’a karşılık gelen bir Class oluşturarak ve bunların özellikleri ile aynı isimlere sahip property’ler oluşturarak yaptım. Bunu yapmamdaki amaç Delphi 2006 içerisinde yerleşik olarak bulunan System.Windows.Forms isim alanı içerisinde tanımlı klasik Object Inspector’un görevini yapan PropertyGrid nesnesini kullanmak istememdi. Çok fazla laf kalabalığı yaptık sanırım, buyurun kodlar aşağıda:(Son bir bilgilendirme olarak proje referanslarından System.Management’i eklemeyi unutmayın)
unit WMIDeneme;
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data, System.Management;
type
TBIOS = class;
TDesktop = class;
TEnvironment = class;
TDiskPartition = class;
TCodecFile = class;
TBootConfiguration = class;
TComputerSystem = class;
TOperatingSystem = class;
TProcessList = class;
TServiceList = class;
TKeyboard = class;
TFanProperties = class;
TCDRom = class;
TWinForm1 = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
///
/// Required designer variable.
///
Components: System.ComponentModel.Container;
pGrid: System.Windows.Forms.PropertyGrid;
Button1: System.Windows.Forms.Button;
Button2: System.Windows.Forms.Button;
Button3: System.Windows.Forms.Button;
Button4: System.Windows.Forms.Button;
Button5: System.Windows.Forms.Button;
Button6: System.Windows.Forms.Button;
Button7: System.Windows.Forms.Button;
Button8: System.Windows.Forms.Button;
Button9: System.Windows.Forms.Button;
Button10: System.Windows.Forms.Button;
Button11: System.Windows.Forms.Button;
Button12: System.Windows.Forms.Button;
Button13: System.Windows.Forms.Button;
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
procedure InitializeComponent;
procedure Button1_Click(sender: System.Object; e: System.EventArgs);
procedure Button2_Click(sender: System.Object; e: System.EventArgs);
procedure Button3_Click(sender: System.Object; e: System.EventArgs);
procedure Button4_Click(sender: System.Object; e: System.EventArgs);
procedure Button5_Click(sender: System.Object; e: System.EventArgs);
procedure Button6_Click(sender: System.Object; e: System.EventArgs);
procedure Button7_Click(sender: System.Object; e: System.EventArgs);
procedure Button8_Click(sender: System.Object; e: System.EventArgs);
procedure Button9_Click(sender: System.Object; e: System.EventArgs);
procedure Button10_Click(sender: System.Object; e: System.EventArgs);
procedure Button11_Click(sender: System.Object; e: System.EventArgs);
procedure Button12_Click(sender: System.Object; e: System.EventArgs);
procedure Button13_Click(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
///
/// Clean up any resources being used.
///
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
end;
TBIOS = class(&Object)
strict private
fBiosVersion : &String;
fBuildNumber : &String;
fCaption : &String;
fCodeSet : &String;
fCurrentLang : &String;
fDescription : &String;
fIdentificationCode: &String;
fInstallableLanguages : UInt16;
fInstallDate : DateTime;
fLanguageEdition : &String;
fManufacturer : &String;
fName : &String;
fOtherTargetOS : &String;
fPrimaryBios : Boolean;
fReleaseDate : DateTime;
fSerialNumber : &String;
fSMBIOSBIOSVersion : &String;
fSMBIOSMajorVersion: UInt16;
fSMBIOSMinorVersion: UInt16;
fSMBIOSPresent : Boolean;
fSoftwareElementID : &String;
fSoftwareElementState : UInt16;
fStatus : &String;
fTargetOperatingSystem : UInt16;
fVersion : &String;
published
property BiosVersion : &String read fBiosVersion write fBiosVersion;
property BuildNumber : &String read fBuildNumber write fBuildNumber;
property Caption : &String read fCaption write fCaption;
property CodeSet : &String read fCodeSet write fCodeSet;
property CurrentLang : &String read fCurrentLang write fCurrentLang;
property Description : &String read fDescription write fDescription;
property IdentificationCode: &String read fIdentificationCode write fIdentificationCode;
property InstallableLanguages : UInt16 read fInstallableLanguages write fInstallableLanguages;
property InstallDate : DateTime read fInstallDate write fInstallDate;
property LanguageEdition : &String read fLanguageEdition write fLanguageEdition;
property Manufacturer : &String read fManufacturer write fManufacturer;
property BiosName : &String read fName write fName;
property OtherTargetOS : &String read fOtherTargetOS write fOtherTargetOS;
property PrimaryBios : Boolean read fPrimaryBios write fPrimaryBios;
property ReleaseDate : DateTime read fReleaseDate write fReleaseDate;
property SerialNumber : &String read fSerialNumber write fSerialNumber;
property SMBIOSBIOSVersion : &String read fSMBIOSBIOSVersion write fSMBIOSBIOSVersion;
property SMBIOSMajorVersion: UInt16 read fSMBIOSMajorVersion write fSMBIOSMajorVersion;
property SMBIOSMinorVersion: UInt16 read fSMBIOSMinorVersion write fSMBIOSMinorVersion;
property SMBIOSPresent : Boolean read fSMBIOSPresent write fSMBIOSPresent;
property SoftwareElementID : &String read fSoftwareElementID write fSoftwareElementID;
property SoftwareElementState : UInt16 read fSoftwareElementState write fSoftwareElementState;
property Status : &String read fStatus write fStatus;
property TargetOperatingSystem : UInt16 read fTargetOperatingSystem write fTargetOperatingSystem;
property Version : &String read fVersion write fVersion;
end;
TDesktop = class(&Object)
strict private
fBorderWidth,
fCaption,
fCoolSwitch,
fCursorBlinkRate,
fDescription,
fDragFullWindows,
fGridGranularity,
fIconSpacing,
fIconTitleFaceName,
fIconTitleSize,
fIconTitleWrap,
fName,
fPattern,
fScreenSaverActive,
fScreenSaverExecutable,
fScreenSaverSecure,
fScreenSaverTimeout,
fSettingID,
fWallpaper,
fWallpaperStretched,
fWallpaperTiled : &Object;
published
property BorderWidth : &Object read fBorderWidth write fBorderWidth ;
property Caption : &Object read fCaption write fCaption ;
property CoolSwitch : &Object read fCoolSwitch write fCoolSwitch ;
property CursorBlinkRate : &Object read fCursorBlinkRate write fCursorBlinkRate ;
property Description : &Object read fDescription write fDescription ;
property DragFullWindows : &Object read fDragFullWindows write fDragFullWindows ;
property GridGranularity : &Object read fGridGranularity write fGridGranularity ;
property IconSpacing : &Object read fIconSpacing write fIconSpacing ;
property IconTitleFaceName : &Object read fIconTitleFaceName write fIconTitleFaceName ;
property IconTitleSize : &Object read fIconTitleSize write fIconTitleSize ;
property IconTitleWrap : &Object read fIconTitleWrap write fIconTitleWrap ;
property Name : &Object read fName write fName ;
property Pattern : &Object read fPattern write fPattern ;
property ScreenSaverActive : &Object read fScreenSaverActive write fScreenSaverActive ;
property ScreenSaverExecutable: &Object read fScreenSaverExecutable write fScreenSaverExecutable ;
property ScreenSaverSecure : &Object read fScreenSaverSecure write fScreenSaverSecure ;
property ScreenSaverTimeout : &Object read fScreenSaverTimeout write fScreenSaverTimeout ;
property SettingID : &Object read fSettingID write fSettingID ;
property Wallpaper : &Object read fWallpaper write fWallpaper ;
property WallpaperStretched : &Object read fWallpaperStretched write fWallpaperStretched ;
property WallpaperTiled : &Object read fWallpaperTiled write fWallpaperTiled ;
end;
TEnvironment = class(&Object)
strict private
fCaption ,
fDescription ,
fInstallDate ,
fName ,
fStatus ,
fSystemVariable ,
fUserName ,
fVariableValue : &Object;
published
property Caption : &Object read fCaption write fCaption ;
property Description : &Object read fDescription write fDescription ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property Name : &Object read fName write fName ;
property Status : &Object read fStatus write fStatus ;
property SystemVariable : &Object read fSystemVariable write fSystemVariable;
property UserName : &Object read fUserName write fUserName ;
property VariableValue : &Object read fVariableValue write fVariableValue ;
end;
TDiskPartition = class(&Object)
strict private
fAccess ,
fAvailability ,
fBlockSize ,
fBootable ,
fBootPartition ,
fCaption ,
fConfigManagerErrorCode ,
fConfigManagerUserConfig ,
fCreationClassName ,
fDescription ,
fDeviceID ,
fDiskIndex ,
fErrorCleared ,
fErrorDescription ,
fErrorMethodology ,
fHiddenSectors ,
fIndex ,
fInstallDate ,
fLastErrorCode ,
fName ,
fNumberOfBlocks ,
fPNPDeviceID ,
fPowerManagementSupported ,
fPrimaryPartition ,
fPurpose ,
fRewritePartition ,
fSize ,
fStartingOffset ,
fStatus ,
fStatusInfo ,
fSystemCreationClassName ,
fSystemName ,
fType : &Object;
published
property Access : &Object read fAccess write fAccess ;
property Availability : &Object read fAvailability write fAvailability ;
property BlockSize : &Object read fBlockSize write fBlockSize ;
property Bootable : &Object read fBootable write fBootable ;
property BootPartition : &Object read fBootPartition write fBootPartition ;
property Caption : &Object read fCaption write fCaption ;
property ConfigManagerErrorCode : &Object read fConfigManagerErrorCode write fConfigManagerErrorCode ;
property ConfigManagerUserConfig : &Object read fConfigManagerUserConfig write fConfigManagerUserConfig ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property Description : &Object read fDescription write fDescription ;
property DeviceID : &Object read fDeviceID write fDeviceID ;
property DiskIndex : &Object read fDiskIndex write fDiskIndex ;
property ErrorCleared : &Object read fErrorCleared write fErrorCleared ;
property ErrorDescription : &Object read fErrorDescription write fErrorDescription ;
property ErrorMethodology : &Object read fErrorMethodology write fErrorMethodology ;
property HiddenSectors : &Object read fHiddenSectors write fHiddenSectors ;
property Index_ : &Object read fIndex write fIndex ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property LastErrorCode : &Object read fLastErrorCode write fLastErrorCode ;
property Name : &Object read fName write fName ;
property NumberOfBlocks : &Object read fNumberOfBlocks write fNumberOfBlocks ;
property PNPDeviceID : &Object read fPNPDeviceID write fPNPDeviceID ;
property PowerManagementSupported : &Object read fPowerManagementSupported write fPowerManagementSupported;
property PrimaryPartition : &Object read fPrimaryPartition write fPrimaryPartition ;
property Purpose : &Object read fPurpose write fPurpose ;
property RewritePartition : &Object read fRewritePartition write fRewritePartition ;
property Size : &Object read fSize write fSize ;
property StartingOffset : &Object read fStartingOffset write fStartingOffset ;
property Status : &Object read fStatus write fStatus ;
property StatusInfo : &Object read fStatusInfo write fStatusInfo ;
property SystemCreationClassName : &Object read fSystemCreationClassName write fSystemCreationClassName ;
property SystemName : &Object read fSystemName write fSystemName ;
property Type_ : &Object read fType write fType ;
end;
TCodecFile = class(&Object)
strict private
fAccessMask ,
fArchive ,
fCaption ,
fCompressed ,
fCompressionMethod ,
fCreationClassName ,
fCreationDate ,
fCSCreationClassName ,
fCSName ,
fDescription ,
fDrive ,
fEightDotThreeFileName,
fEncrypted ,
fEncryptionMethod ,
fExtension ,
fFileName ,
fFileSize ,
fFileType ,
fFSCreationClassName ,
fFSName ,
fGroup ,
fHidden ,
fInstallDate ,
fInUseCount ,
fLastAccessed ,
fLastModified ,
fManufacturer ,
fName ,
fPath ,
fReadable ,
fStatus ,
fSystem ,
fVersion ,
fWriteable : &Object;
published
property AccessMask : &Object read fAccessMask write fAccessMask ;
property Archive : &Object read fArchive write fArchive ;
property Caption : &Object read fCaption write fCaption ;
property Compressed : &Object read fCompressed write fCompressed ;
property CompressionMethod : &Object read fCompressionMethod write fCompressionMethod ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property CreationDate : &Object read fCreationDate write fCreationDate ;
property CSCreationClassName : &Object read fCSCreationClassName write fCSCreationClassName ;
property CSName : &Object read fCSName write fCSName ;
property Description : &Object read fDescription write fDescription ;
property Drive : &Object read fDrive write fDrive ;
property EightDotThreeFileName : &Object read fEightDotThreeFileName write fEightDotThreeFileName ;
property Encrypted : &Object read fEncrypted write fEncrypted ;
property EncryptionMethod : &Object read fEncryptionMethod write fEncryptionMethod ;
property Extension : &Object read fExtension write fExtension ;
property FileName : &Object read fFileName write fFileName ;
property FileSize : &Object read fFileSize write fFileSize ;
property FileType : &Object read fFileType write fFileType ;
property FSCreationClassName : &Object read fFSCreationClassName write fFSCreationClassName ;
property FSName : &Object read fFSName write fFSName ;
property Group : &Object read fGroup write fGroup ;
property Hidden : &Object read fHidden write fHidden ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property InUseCount : &Object read fInUseCount write fInUseCount ;
property LastAccessed : &Object read fLastAccessed write fLastAccessed ;
property LastModified : &Object read fLastModified write fLastModified ;
property Manufacturer : &Object read fManufacturer write fManufacturer ;
property Name : &Object read fName write fName ;
property Path : &Object read fPath write fPath ;
property Readable : &Object read fReadable write fReadable ;
property Status : &Object read fStatus write fStatus ;
property System : &Object read fSystem write fSystem ;
property Version : &Object read fVersion write fVersion ;
property Writeable : &Object read fWriteable write fWriteable ;
end;
TBootConfiguration = class(&Object)
strict private
fBootDirectory ,
fCaption ,
fConfigurationPath ,
fDescription ,
fLastDrive ,
fName ,
fScratchDirectory ,
fSettingID ,
fTempDirectory : &Object;
published
property BootDirectory : &Object read fBootDirectory write fBootDirectory ;
property Caption : &Object read fCaption write fCaption ;
property ConfigurationPath : &Object read fConfigurationPath write fConfigurationPath;
property Description : &Object read fDescription write fDescription ;
property LastDrive : &Object read fLastDrive write fLastDrive ;
property Name : &Object read fName write fName ;
property ScratchDirectory : &Object read fScratchDirectory write fScratchDirectory ;
property SettingID : &Object read fSettingID write fSettingID ;
property TempDirectory : &Object read fTempDirectory write fTempDirectory ;
end;
TComputerSystem = class(&Object)
strict private
fAdminPasswordStatus ,
fAutomaticManagedPagefile ,
fAutomaticResetBootOption ,
fAutomaticResetCapability ,
fBootOptionOnLimit ,
fBootOptionOnWatchDog ,
fBootROMSupported ,
fBootupState ,
fCaption ,
fChassisBootupState ,
fCreationClassName ,
fCurrentTimeZone ,
fDaylightInEffect ,
fDescription ,
fDNSHostName ,
fDomain ,
fDomainRole ,
fEnableDaylightSavingsTime,
fFrontPanelResetStatus ,
fInfraredSupported ,
fInitialLoadInfo ,
fInstallDate ,
fKeyboardPasswordStatus ,
fLastLoadInfo ,
fManufacturer ,
fModel ,
fName ,
fNameFormat ,
fNetworkServerModeEnabled ,
fNumberOfLogicalProcessors,
fNumberOfProcessors ,
fPartOfDomain ,
fPauseAfterReset ,
fPCSystemType ,
fPowerManagementSupported ,
fPowerOnPasswordStatus ,
fPowerState ,
fPowerSupplyState ,
fPrimaryOwnerContact ,
fPrimaryOwnerName ,
fResetCapability ,
fResetCount ,
fResetLimit ,
fStatus ,
fSystemStartupDelay ,
fSystemStartupSetting ,
fSystemType ,
fThermalState ,
fTotalPhysicalMemory ,
fUserName ,
fWakeUpType ,
fWorkgroup : &Object;
published
property AdminPasswordStatus : &Object read fAdminPasswordStatus write fAdminPasswordStatus ;
property AutomaticManagedPagefile : &Object read fAutomaticManagedPagefile write fAutomaticManagedPagefile ;
property AutomaticResetBootOption : &Object read fAutomaticResetBootOption write fAutomaticResetBootOption ;
property AutomaticResetCapability : &Object read fAutomaticResetCapability write fAutomaticResetCapability ;
property BootOptionOnLimit : &Object read fBootOptionOnLimit write fBootOptionOnLimit ;
property BootOptionOnWatchDog : &Object read fBootOptionOnWatchDog write fBootOptionOnWatchDog ;
property BootROMSupported : &Object read fBootROMSupported write fBootROMSupported ;
property BootupState : &Object read fBootupState write fBootupState ;
property Caption : &Object read fCaption write fCaption ;
property ChassisBootupState : &Object read fChassisBootupState write fChassisBootupState ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property CurrentTimeZone : &Object read fCurrentTimeZone write fCurrentTimeZone ;
property DaylightInEffect : &Object read fDaylightInEffect write fDaylightInEffect ;
property Description : &Object read fDescription write fDescription ;
property DNSHostName : &Object read fDNSHostName write fDNSHostName ;
property Domain : &Object read fDomain write fDomain ;
property DomainRole : &Object read fDomainRole write fDomainRole ;
property EnableDaylightSavingsTime : &Object read fEnableDaylightSavingsTime write fEnableDaylightSavingsTime;
property FrontPanelResetStatus : &Object read fFrontPanelResetStatus write fFrontPanelResetStatus ;
property InfraredSupported : &Object read fInfraredSupported write fInfraredSupported ;
property InitialLoadInfo : &Object read fInitialLoadInfo write fInitialLoadInfo ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property KeyboardPasswordStatus : &Object read fKeyboardPasswordStatus write fKeyboardPasswordStatus ;
property LastLoadInfo : &Object read fLastLoadInfo write fLastLoadInfo ;
property Manufacturer : &Object read fManufacturer write fManufacturer ;
property Model : &Object read fModel write fModel ;
property Name : &Object read fName write fName ;
property NameFormat : &Object read fNameFormat write fNameFormat ;
property NetworkServerModeEnabled : &Object read fNetworkServerModeEnabled write fNetworkServerModeEnabled ;
property NumberOfLogicalProcessors : &Object read fNumberOfLogicalProcessors write fNumberOfLogicalProcessors;
property NumberOfProcessors : &Object read fNumberOfProcessors write fNumberOfProcessors ;
property PartOfDomain : &Object read fPartOfDomain write fPartOfDomain ;
property PauseAfterReset : &Object read fPauseAfterReset write fPauseAfterReset ;
property PCSystemType : &Object read fPCSystemType write fPCSystemType ;
property PowerManagementSupported : &Object read fPowerManagementSupported write fPowerManagementSupported ;
property PowerOnPasswordStatus : &Object read fPowerOnPasswordStatus write fPowerOnPasswordStatus ;
property PowerState : &Object read fPowerState write fPowerState ;
property PowerSupplyState : &Object read fPowerSupplyState write fPowerSupplyState ;
property PrimaryOwnerContact : &Object read fPrimaryOwnerContact write fPrimaryOwnerContact ;
property PrimaryOwnerName : &Object read fPrimaryOwnerName write fPrimaryOwnerName ;
property ResetCapability : &Object read fResetCapability write fResetCapability ;
property ResetCount : &Object read fResetCount write fResetCount ;
property ResetLimit : &Object read fResetLimit write fResetLimit ;
property Status : &Object read fStatus write fStatus ;
property SystemStartupDelay : &Object read fSystemStartupDelay write fSystemStartupDelay ;
property SystemStartupSetting : &Object read fSystemStartupSetting write fSystemStartupSetting ;
property SystemType : &Object read fSystemType write fSystemType ;
property ThermalState : &Object read fThermalState write fThermalState ;
property TotalPhysicalMemory : &Object read fTotalPhysicalMemory write fTotalPhysicalMemory ;
property UserName : &Object read fUserName write fUserName ;
property WakeUpType : &Object read fWakeUpType write fWakeUpType ;
property Workgroup : &Object read fWorkgroup write fWorkgroup ;
end;
TOperatingSystem = class(&Object)
strict private
fBootDevice ,
fBuildNumber ,
fBuildType ,
fCaption ,
fCodeSet ,
fCountryCode ,
fCreationClassName ,
fCSCreationClassName ,
fCSDVersion ,
fCSName ,
fCurrentTimeZone ,
fDataExecutionPrevention_32BitApplications ,
fDataExecutionPrevention_Available ,
fDataExecutionPrevention_Drivers ,
fDataExecutionPrevention_SupportPolicy ,
fDebug ,
fDescription ,
fDistributed ,
fEncryptionLevel ,
fForegroundApplicationBoost ,
fFreePhysicalMemory ,
fFreeSpaceInPagingFiles ,
fFreeVirtualMemory ,
fInstallDate ,
fLargeSystemCache ,
fLastBootUpTime ,
fLocalDateTime ,
fLocale ,
fManufacturer ,
fMaxNumberOfProcesses ,
fMaxProcessMemorySize ,
fName ,
fNumberOfLicensedUsers ,
fNumberOfProcesses ,
fNumberOfUsers ,
fOrganization ,
fOSArchitecture ,
fOSLanguage ,
fOSProductSuite ,
fOSType ,
fOtherTypeDescription ,
fPAEEnabled ,
fPlusProductID ,
fPlusVersionNumber ,
fPrimary ,
fProductType ,
fQuantumLength ,
fQuantumType ,
fRegisteredUser ,
fSerialNumber ,
fServicePackMajorVersion ,
fServicePackMinorVersion ,
fSizeStoredInPagingFiles ,
fStatus ,
fSuiteMask ,
fSystemDevice ,
fSystemDirectory ,
fSystemDrive ,
fTotalSwapSpaceSize ,
fTotalVirtualMemorySize ,
fTotalVisibleMemorySize ,
fVersion ,
fWindowsDirectory ,
fWOWEnvironment : &Object;
published
property BootDevice : &Object read fBootDevice write fBootDevice ;
property BuildNumber : &Object read fBuildNumber write fBuildNumber ;
property BuildType : &Object read fBuildType write fBuildType ;
property Caption : &Object read fCaption write fCaption ;
property CodeSet : &Object read fCodeSet write fCodeSet ;
property CountryCode : &Object read fCountryCode write fCountryCode ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property CSCreationClassName : &Object read fCSCreationClassName write fCSCreationClassName ;
property CSDVersion : &Object read fCSDVersion write fCSDVersion ;
property CSName : &Object read fCSName write fCSName ;
property CurrentTimeZone : &Object read fCurrentTimeZone write fCurrentTimeZone ;
property DataExecutionPrevention_32BitApplications : &Object read fDataExecutionPrevention_32BitApplications write fDataExecutionPrevention_32BitApplications;
property DataExecutionPrevention_Available : &Object read fDataExecutionPrevention_Available write fDataExecutionPrevention_Available ;
property DataExecutionPrevention_Drivers : &Object read fDataExecutionPrevention_Drivers write fDataExecutionPrevention_Drivers ;
property DataExecutionPrevention_SupportPolicy : &Object read fDataExecutionPrevention_SupportPolicy write fDataExecutionPrevention_SupportPolicy ;
property Debug : &Object read fDebug write fDebug ;
property Description : &Object read fDescription write fDescription ;
property Distributed : &Object read fDistributed write fDistributed ;
property EncryptionLevel : &Object read fEncryptionLevel write fEncryptionLevel ;
property ForegroundApplicationBoost : &Object read fForegroundApplicationBoost write fForegroundApplicationBoost ;
property FreePhysicalMemory : &Object read fFreePhysicalMemory write fFreePhysicalMemory ;
property FreeSpaceInPagingFiles : &Object read fFreeSpaceInPagingFiles write fFreeSpaceInPagingFiles ;
property FreeVirtualMemory : &Object read fFreeVirtualMemory write fFreeVirtualMemory ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property LargeSystemCache : &Object read fLargeSystemCache write fLargeSystemCache ;
property LastBootUpTime : &Object read fLastBootUpTime write fLastBootUpTime ;
property LocalDateTime : &Object read fLocalDateTime write fLocalDateTime ;
property Locale : &Object read fLocale write fLocale ;
property Manufacturer : &Object read fManufacturer write fManufacturer ;
property MaxNumberOfProcesses : &Object read fMaxNumberOfProcesses write fMaxNumberOfProcesses ;
property MaxProcessMemorySize : &Object read fMaxProcessMemorySize write fMaxProcessMemorySize ;
property Name : &Object read fName write fName ;
property NumberOfLicensedUsers : &Object read fNumberOfLicensedUsers write fNumberOfLicensedUsers ;
property NumberOfProcesses : &Object read fNumberOfProcesses write fNumberOfProcesses ;
property NumberOfUsers : &Object read fNumberOfUsers write fNumberOfUsers ;
property Organization : &Object read fOrganization write fOrganization ;
property OSArchitecture : &Object read fOSArchitecture write fOSArchitecture ;
property OSLanguage : &Object read fOSLanguage write fOSLanguage ;
property OSProductSuite : &Object read fOSProductSuite write fOSProductSuite ;
property OSType : &Object read fOSType write fOSType ;
property OtherTypeDescription : &Object read fOtherTypeDescription write fOtherTypeDescription ;
property PAEEnabled : &Object read fPAEEnabled write fPAEEnabled ;
property PlusProductID : &Object read fPlusProductID write fPlusProductID ;
property PlusVersionNumber : &Object read fPlusVersionNumber write fPlusVersionNumber ;
property Primary : &Object read fPrimary write fPrimary ;
property ProductType : &Object read fProductType write fProductType ;
property QuantumLength : &Object read fQuantumLength write fQuantumLength ;
property QuantumType : &Object read fQuantumType write fQuantumType ;
property RegisteredUser : &Object read fRegisteredUser write fRegisteredUser ;
property SerialNumber : &Object read fSerialNumber write fSerialNumber ;
property ServicePackMajorVersion : &Object read fServicePackMajorVersion write fServicePackMajorVersion ;
property ServicePackMinorVersion : &Object read fServicePackMinorVersion write fServicePackMinorVersion ;
property SizeStoredInPagingFiles : &Object read fSizeStoredInPagingFiles write fSizeStoredInPagingFiles ;
property Status : &Object read fStatus write fStatus ;
property SuiteMask : &Object read fSuiteMask write fSuiteMask ;
property SystemDevice : &Object read fSystemDevice write fSystemDevice ;
property SystemDirectory : &Object read fSystemDirectory write fSystemDirectory ;
property SystemDrive : &Object read fSystemDrive write fSystemDrive ;
property TotalSwapSpaceSize : &Object read fTotalSwapSpaceSize write fTotalSwapSpaceSize ;
property TotalVirtualMemorySize : &Object read fTotalVirtualMemorySize write fTotalVirtualMemorySize ;
property TotalVisibleMemorySize : &Object read fTotalVisibleMemorySize write fTotalVisibleMemorySize ;
property Version : &Object read fVersion write fVersion ;
property WindowsDirectory : &Object read fWindowsDirectory write fWindowsDirectory ;
property WOWEnvironment : &Object read fWOWEnvironment write fWOWEnvironment ;
end;
TProcessList = class(&Object)
strict private
fCaption ,
fCommandLine ,
fCreationClassName ,
fCreationDate ,
fCSCreationClassName ,
fCSName ,
fDescription ,
fExecutablePath ,
fExecutionState ,
fHandle ,
fHandleCount ,
fInstallDate ,
fKernelModeTime ,
fMaximumWorkingSetSize ,
fMinimumWorkingSetSize ,
fName ,
fOSCreationClassName ,
fOSName ,
fOtherOperationCount ,
fOtherTransferCount ,
fPageFaults ,
fPageFileUsage ,
fParentProcessId ,
fPeakPageFileUsage ,
fPeakVirtualSize ,
fPeakWorkingSetSize ,
fPriority ,
fPrivatePageCount ,
fProcessId ,
fQuotaNonPagedPoolUsage ,
fQuotaPagedPoolUsage ,
fQuotaPeakNonPagedPoolUsage ,
fQuotaPeakPagedPoolUsage ,
fReadOperationCount ,
fReadTransferCount ,
fSessionId ,
fStatus ,
fTerminationDate ,
fThreadCount ,
fUserModeTime ,
fVirtualSize ,
fWindowsVersion ,
fWorkingSetSize ,
fWriteOperationCount ,
fWriteTransferCount : &Object;
published
property Caption : &Object read fCaption write fCaption ;
property CommandLine : &Object read fCommandLine write fCommandLine ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property CreationDate : &Object read fCreationDate write fCreationDate ;
property CSCreationClassName : &Object read fCSCreationClassName write fCSCreationClassName ;
property CSName : &Object read fCSName write fCSName ;
property Description : &Object read fDescription write fDescription ;
property ExecutablePath : &Object read fExecutablePath write fExecutablePath ;
property ExecutionState : &Object read fExecutionState write fExecutionState ;
property Handle : &Object read fHandle write fHandle ;
property HandleCount : &Object read fHandleCount write fHandleCount ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property KernelModeTime : &Object read fKernelModeTime write fKernelModeTime ;
property MaximumWorkingSetSize : &Object read fMaximumWorkingSetSize write fMaximumWorkingSetSize ;
property MinimumWorkingSetSize : &Object read fMinimumWorkingSetSize write fMinimumWorkingSetSize ;
property Name : &Object read fName write fName ;
property OSCreationClassName : &Object read fOSCreationClassName write fOSCreationClassName ;
property OSName : &Object read fOSName write fOSName ;
property OtherOperationCount : &Object read fOtherOperationCount write fOtherOperationCount ;
property OtherTransferCount : &Object read fOtherTransferCount write fOtherTransferCount ;
property PageFaults : &Object read fPageFaults write fPageFaults ;
property PageFileUsage : &Object read fPageFileUsage write fPageFileUsage ;
property ParentProcessId : &Object read fParentProcessId write fParentProcessId ;
property PeakPageFileUsage : &Object read fPeakPageFileUsage write fPeakPageFileUsage ;
property PeakVirtualSize : &Object read fPeakVirtualSize write fPeakVirtualSize ;
property PeakWorkingSetSize : &Object read fPeakWorkingSetSize write fPeakWorkingSetSize ;
property Priority : &Object read fPriority write fPriority ;
property PrivatePageCount : &Object read fPrivatePageCount write fPrivatePageCount ;
property ProcessId : &Object read fProcessId write fProcessId ;
property QuotaNonPagedPoolUsage : &Object read fQuotaNonPagedPoolUsage write fQuotaNonPagedPoolUsage ;
property QuotaPagedPoolUsage : &Object read fQuotaPagedPoolUsage write fQuotaPagedPoolUsage ;
property QuotaPeakNonPagedPoolUsage : &Object read fQuotaPeakNonPagedPoolUsage write fQuotaPeakNonPagedPoolUsage;
property QuotaPeakPagedPoolUsage : &Object read fQuotaPeakPagedPoolUsage write fQuotaPeakPagedPoolUsage ;
property ReadOperationCount : &Object read fReadOperationCount write fReadOperationCount ;
property ReadTransferCount : &Object read fReadTransferCount write fReadTransferCount ;
property SessionId : &Object read fSessionId write fSessionId ;
property Status : &Object read fStatus write fStatus ;
property TerminationDate : &Object read fTerminationDate write fTerminationDate ;
property ThreadCount : &Object read fThreadCount write fThreadCount ;
property UserModeTime : &Object read fUserModeTime write fUserModeTime ;
property VirtualSize : &Object read fVirtualSize write fVirtualSize ;
property WindowsVersion : &Object read fWindowsVersion write fWindowsVersion ;
property WorkingSetSize : &Object read fWorkingSetSize write fWorkingSetSize ;
property WriteOperationCount : &Object read fWriteOperationCount write fWriteOperationCount ;
property WriteTransferCount : &Object read fWriteTransferCount write fWriteTransferCount ;
end;
TServiceList = class(&Object)
strict private
fAcceptPause ,
fAcceptStop ,
fCaption ,
fCheckPoint ,
fCreationClassName ,
fDescription ,
fDesktopInteract ,
fDisplayName ,
fErrorControl ,
fExitCode ,
fInstallDate ,
fName ,
fPathName ,
fProcessId ,
fServiceSpecificExitCode ,
fServiceType ,
fStarted ,
fStartMode ,
fStartName ,
fState ,
fStatus ,
fSystemCreationClassName ,
fSystemName ,
fTagId ,
fWaitHint : &Object;
published
property AcceptPause : &Object read fAcceptPause write fAcceptPause ;
property AcceptStop : &Object read fAcceptStop write fAcceptStop ;
property Caption : &Object read fCaption write fCaption ;
property CheckPoint : &Object read fCheckPoint write fCheckPoint ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property Description : &Object read fDescription write fDescription ;
property DesktopInteract : &Object read fDesktopInteract write fDesktopInteract ;
property DisplayName : &Object read fDisplayName write fDisplayName ;
property ErrorControl : &Object read fErrorControl write fErrorControl ;
property ExitCode : &Object read fExitCode write fExitCode ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property Name : &Object read fName write fName ;
property PathName : &Object read fPathName write fPathName ;
property ProcessId : &Object read fProcessId write fProcessId ;
property ServiceSpecificExitCode : &Object read fServiceSpecificExitCode write fServiceSpecificExitCode;
property ServiceType : &Object read fServiceType write fServiceType ;
property Started : &Object read fStarted write fStarted ;
property StartMode : &Object read fStartMode write fStartMode ;
property StartName : &Object read fStartName write fStartName ;
property State : &Object read fState write fState ;
property Status : &Object read fStatus write fStatus ;
property SystemCreationClassName : &Object read fSystemCreationClassName write fSystemCreationClassName;
property SystemName : &Object read fSystemName write fSystemName ;
property TagId : &Object read fTagId write fTagId ;
property WaitHint : &Object read fWaitHint write fWaitHint ;
end;
TKeyboard = class(&Object)
strict private
fAvailability ,
fCaption ,
fConfigManagerErrorCode ,
fConfigManagerUserConfig ,
fCreationClassName ,
fDescription ,
fDeviceID ,
fErrorCleared ,
fErrorDescription ,
fInstallDate ,
fIsLocked ,
fLastErrorCode ,
fLayout ,
fName ,
fNumberOfFunctionKeys ,
fPassword ,
fPNPDeviceID ,
fPowerManagementSupported ,
fStatus ,
fStatusInfo ,
fSystemCreationClassName ,
fSystemName : &Object;
published
property Availability : &Object read fAvailability write fAvailability ;
property Caption : &Object read fCaption write fCaption ;
property ConfigManagerErrorCode : &Object read fConfigManagerErrorCode write fConfigManagerErrorCode ;
property ConfigManagerUserConfig : &Object read fConfigManagerUserConfig write fConfigManagerUserConfig ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property Description : &Object read fDescription write fDescription ;
property DeviceID : &Object read fDeviceID write fDeviceID ;
property ErrorCleared : &Object read fErrorCleared write fErrorCleared ;
property ErrorDescription : &Object read fErrorDescription write fErrorDescription ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property IsLocked : &Object read fIsLocked write fIsLocked ;
property LastErrorCode : &Object read fLastErrorCode write fLastErrorCode ;
property Layout : &Object read fLayout write fLayout ;
property Name : &Object read fName write fName ;
property NumberOfFunctionKeys : &Object read fNumberOfFunctionKeys write fNumberOfFunctionKeys ;
property Password : &Object read fPassword write fPassword ;
property PNPDeviceID : &Object read fPNPDeviceID write fPNPDeviceID ;
property PowerManagementSupported : &Object read fPowerManagementSupported write fPowerManagementSupported;
property Status : &Object read fStatus write fStatus ;
property StatusInfo : &Object read fStatusInfo write fStatusInfo ;
property SystemCreationClassName : &Object read fSystemCreationClassName write fSystemCreationClassName ;
property SystemName : &Object read fSystemName write fSystemName ;
end;
TFanProperties = class(&Object)
strict private
fActiveCooling ,
fAvailability ,
fCaption ,
fConfigManagerErrorCode ,
fConfigManagerUserConfig ,
fCreationClassName ,
fDescription ,
fDesiredSpeed ,
fDeviceID ,
fErrorCleared ,
fErrorDescription ,
fInstallDate ,
fLastErrorCode ,
fName ,
fPNPDeviceID ,
fPowerManagementSupported ,
fStatus ,
fStatusInfo ,
fSystemCreationClassName ,
fSystemName ,
fVariableSpeed : &Object;
published
property ActiveCooling : &Object read fActiveCooling write fActiveCooling ;
property Availability : &Object read fAvailability write fAvailability ;
property Caption : &Object read fCaption write fCaption ;
property ConfigManagerErrorCode : &Object read fConfigManagerErrorCode write fConfigManagerErrorCode ;
property ConfigManagerUserConfig : &Object read fConfigManagerUserConfig write fConfigManagerUserConfig ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property Description : &Object read fDescription write fDescription ;
property DesiredSpeed : &Object read fDesiredSpeed write fDesiredSpeed ;
property DeviceID : &Object read fDeviceID write fDeviceID ;
property ErrorCleared : &Object read fErrorCleared write fErrorCleared ;
property ErrorDescription : &Object read fErrorDescription write fErrorDescription ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property LastErrorCode : &Object read fLastErrorCode write fLastErrorCode ;
property Name : &Object read fName write fName ;
property PNPDeviceID : &Object read fPNPDeviceID write fPNPDeviceID ;
property PowerManagementSupported : &Object read fPowerManagementSupported write fPowerManagementSupported;
property Status : &Object read fStatus write fStatus ;
property StatusInfo : &Object read fStatusInfo write fStatusInfo ;
property SystemCreationClassName : &Object read fSystemCreationClassName write fSystemCreationClassName ;
property SystemName : &Object read fSystemName write fSystemName ;
property VariableSpeed : &Object read fVariableSpeed write fVariableSpeed ;
end;
TCDRom = class(&Object)
strict private
fAvailability ,
fCaption ,
fCompressionMethod ,
fConfigManagerErrorCode ,
fConfigManagerUserConfig ,
fCreationClassName ,
fDefaultBlockSize ,
fDescription ,
fDeviceID ,
fDrive ,
fDriveIntegrity ,
fErrorCleared ,
fErrorDescription ,
fErrorMethodology ,
fFileSystemFlags ,
fFileSystemFlagsEx ,
fId ,
fInstallDate ,
fLastErrorCode ,
fManufacturer ,
fMaxBlockSize ,
fMaximumComponentLength ,
fMaxMediaSize ,
fMediaLoaded ,
fMediaType ,
fMfrAssignedRevisionLevel ,
fMinBlockSize ,
fName ,
fNeedsCleaning ,
fNumberOfMediaSupported ,
fPNPDeviceID ,
fPowerManagementSupported ,
fRevisionLevel ,
fSCSIBus ,
fSCSILogicalUnit ,
fSCSIPort ,
fSCSITargetId ,
fSerialNumber ,
fSize ,
fStatus ,
fStatusInfo ,
fSystemCreationClassName ,
fSystemName ,
fTransferRate ,
fVolumeName ,
fVolumeSerialNumber : &Object;
published
property Availability : &Object read fAvailability write fAvailability ;
property Caption : &Object read fCaption write fCaption ;
property CompressionMethod : &Object read fCompressionMethod write fCompressionMethod ;
property ConfigManagerErrorCode : &Object read fConfigManagerErrorCode write fConfigManagerErrorCode ;
property ConfigManagerUserConfig : &Object read fConfigManagerUserConfig write fConfigManagerUserConfig ;
property CreationClassName : &Object read fCreationClassName write fCreationClassName ;
property DefaultBlockSize : &Object read fDefaultBlockSize write fDefaultBlockSize ;
property Description : &Object read fDescription write fDescription ;
property DeviceID : &Object read fDeviceID write fDeviceID ;
property Drive : &Object read fDrive write fDrive ;
property DriveIntegrity : &Object read fDriveIntegrity write fDriveIntegrity ;
property ErrorCleared : &Object read fErrorCleared write fErrorCleared ;
property ErrorDescription : &Object read fErrorDescription write fErrorDescription ;
property ErrorMethodology : &Object read fErrorMethodology write fErrorMethodology ;
property FileSystemFlags : &Object read fFileSystemFlags write fFileSystemFlags ;
property FileSystemFlagsEx : &Object read fFileSystemFlagsEx write fFileSystemFlagsEx ;
property Id : &Object read fId write fId ;
property InstallDate : &Object read fInstallDate write fInstallDate ;
property LastErrorCode : &Object read fLastErrorCode write fLastErrorCode ;
property Manufacturer : &Object read fManufacturer write fManufacturer ;
property MaxBlockSize : &Object read fMaxBlockSize write fMaxBlockSize ;
property MaximumComponentLength : &Object read fMaximumComponentLength write fMaximumComponentLength ;
property MaxMediaSize : &Object read fMaxMediaSize write fMaxMediaSize ;
property MediaLoaded : &Object read fMediaLoaded write fMediaLoaded ;
property MediaType : &Object read fMediaType write fMediaType ;
property MfrAssignedRevisionLevel : &Object read fMfrAssignedRevisionLevel write fMfrAssignedRevisionLevel;
property MinBlockSize : &Object read fMinBlockSize write fMinBlockSize ;
property Name : &Object read fName write fName ;
property NeedsCleaning : &Object read fNeedsCleaning write fNeedsCleaning ;
property NumberOfMediaSupported : &Object read fNumberOfMediaSupported write fNumberOfMediaSupported ;
property PNPDeviceID : &Object read fPNPDeviceID write fPNPDeviceID ;
property PowerManagementSupported : &Object read fPowerManagementSupported write fPowerManagementSupported;
property RevisionLevel : &Object read fRevisionLevel write fRevisionLevel ;
property SCSIBus : &Object read fSCSIBus write fSCSIBus ;
property SCSILogicalUnit : &Object read fSCSILogicalUnit write fSCSILogicalUnit ;
property SCSIPort : &Object read fSCSIPort write fSCSIPort ;
property SCSITargetId : &Object read fSCSITargetId write fSCSITargetId ;
property SerialNumber : &Object read fSerialNumber write fSerialNumber ;
property Size : &Object read fSize write fSize ;
property Status : &Object read fStatus write fStatus ;
property StatusInfo : &Object read fStatusInfo write fStatusInfo ;
property SystemCreationClassName : &Object read fSystemCreationClassName write fSystemCreationClassName ;
property SystemName : &Object read fSystemName write fSystemName ;
property TransferRate : &Object read fTransferRate write fTransferRate ;
property VolumeName : &Object read fVolumeName write fVolumeName ;
property VolumeSerialNumber : &Object read fVolumeSerialNumber write fVolumeSerialNumber ;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm1))]
implementation
{$AUTOBOX ON}
{$REGION 'Windows Form Designer generated code'}
///
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
///
procedure TWinForm1.InitializeComponent;
begin
Self.pGrid := System.Windows.Forms.PropertyGrid.Create;
Self.Button1 := System.Windows.Forms.Button.Create;
Self.Button2 := System.Windows.Forms.Button.Create;
Self.Button3 := System.Windows.Forms.Button.Create;
Self.Button4 := System.Windows.Forms.Button.Create;
Self.Button5 := System.Windows.Forms.Button.Create;
Self.Button6 := System.Windows.Forms.Button.Create;
Self.Button7 := System.Windows.Forms.Button.Create;
Self.Button8 := System.Windows.Forms.Button.Create;
Self.Button9 := System.Windows.Forms.Button.Create;
Self.Button10 := System.Windows.Forms.Button.Create;
Self.Button11 := System.Windows.Forms.Button.Create;
Self.Button12 := System.Windows.Forms.Button.Create;
Self.Button13 := System.Windows.Forms.Button.Create;
Self.SuspendLayout;
//
// pGrid
//
Self.pGrid.CommandsVisibleIfAvailable := True;
Self.pGrid.Dock := System.Windows.Forms.DockStyle.Right;
Self.pGrid.LargeButtons := False;
Self.pGrid.LineColor := System.Drawing.SystemColors.ScrollBar;
Self.pGrid.Location := System.Drawing.Point.Create(208, 0);
Self.pGrid.Name := 'pGrid';
Self.pGrid.Size := System.Drawing.Size.Create(408, 643);
Self.pGrid.TabIndex := 0;
Self.pGrid.Text := 'PropertyGrid1';
Self.pGrid.ViewBackColor := System.Drawing.SystemColors.Window;
Self.pGrid.ViewForeColor := System.Drawing.SystemColors.WindowText;
//
// Button1
//
Self.Button1.Location := System.Drawing.Point.Create(5, 6);
Self.Button1.Name := 'Button1';
Self.Button1.Size := System.Drawing.Size.Create(152, 40);
Self.Button1.TabIndex := 1;
Self.Button1.Text := 'BIOS Bilgilerini Al';
Include(Self.Button1.Click, Self.Button1_Click);
//
// Button2
//
Self.Button2.Location := System.Drawing.Point.Create(5, 48);
Self.Button2.Name := 'Button2';
Self.Button2.Size := System.Drawing.Size.Create(152, 40);
Self.Button2.TabIndex := 2;
Self.Button2.Text := 'Desktop Bilgilerini Al';
Include(Self.Button2.Click, Self.Button2_Click);
//
// Button3
//
Self.Button3.Location := System.Drawing.Point.Create(5, 88);
Self.Button3.Name := 'Button3';
Self.Button3.Size := System.Drawing.Size.Create(152, 40);
Self.Button3.TabIndex := 3;
Self.Button3.Text := 'Environment Bilgilerini Al';
Include(Self.Button3.Click, Self.Button3_Click);
//
// Button4
//
Self.Button4.Location := System.Drawing.Point.Create(5, 128);
Self.Button4.Name := 'Button4';
Self.Button4.Size := System.Drawing.Size.Create(152, 40);
Self.Button4.TabIndex := 4;
Self.Button4.Text := 'Partition Bilgilerini Al';
Include(Self.Button4.Click, Self.Button4_Click);
//
// Button5
//
Self.Button5.Location := System.Drawing.Point.Create(5, 168);
Self.Button5.Name := 'Button5';
Self.Button5.Size := System.Drawing.Size.Create(152, 40);
Self.Button5.TabIndex := 5;
Self.Button5.Text := 'Codec Bilgilerini Al';
Include(Self.Button5.Click, Self.Button5_Click);
//
// Button6
//
Self.Button6.Location := System.Drawing.Point.Create(5, 208);
Self.Button6.Name := 'Button6';
Self.Button6.Size := System.Drawing.Size.Create(152, 40);
Self.Button6.TabIndex := 6;
Self.Button6.Text := 'Boot Configuration Bilgilerini Al';
Include(Self.Button6.Click, Self.Button6_Click);
//
// Button7
//
Self.Button7.Location := System.Drawing.Point.Create(5, 248);
Self.Button7.Name := 'Button7';
Self.Button7.Size := System.Drawing.Size.Create(152, 40);
Self.Button7.TabIndex := 7;
Self.Button7.Text := 'Computer System Bilgilerini Al';
Include(Self.Button7.Click, Self.Button7_Click);
//
// Button8
//
Self.Button8.Location := System.Drawing.Point.Create(5, 288);
Self.Button8.Name := 'Button8';
Self.Button8.Size := System.Drawing.Size.Create(152, 40);
Self.Button8.TabIndex := 8;
Self.Button8.Text := 'فletim Sistemi Bilgilerini Al';
Include(Self.Button8.Click, Self.Button8_Click);
//
// Button9
//
Self.Button9.Location := System.Drawing.Point.Create(5, 328);
Self.Button9.Name := 'Button9';
Self.Button9.Size := System.Drawing.Size.Create(152, 40);
Self.Button9.TabIndex := 9;
Self.Button9.Text := 'Process Bilgilerini Al';
Include(Self.Button9.Click, Self.Button9_Click);
//
// Button10
//
Self.Button10.Location := System.Drawing.Point.Create(5, 368);
Self.Button10.Name := 'Button10';
Self.Button10.Size := System.Drawing.Size.Create(152, 40);
Self.Button10.TabIndex := 10;
Self.Button10.Text := 'Servis Listesini Al';
Include(Self.Button10.Click, Self.Button10_Click);
//
// Button11
//
Self.Button11.Location := System.Drawing.Point.Create(5, 408);
Self.Button11.Name := 'Button11';
Self.Button11.Size := System.Drawing.Size.Create(152, 40);
Self.Button11.TabIndex := 11;
Self.Button11.Text := 'Klavye Bilgilerini Al';
Include(Self.Button11.Click, Self.Button11_Click);
//
// Button12
//
Self.Button12.Location := System.Drawing.Point.Create(6, 448);
Self.Button12.Name := 'Button12';
Self.Button12.Size := System.Drawing.Size.Create(152, 40);
Self.Button12.TabIndex := 12;
Self.Button12.Text := 'Fan Bilgilerini Al';
Include(Self.Button12.Click, Self.Button12_Click);
//
// Button13
//
Self.Button13.Location := System.Drawing.Point.Create(8, 488);
Self.Button13.Name := 'Button13';
Self.Button13.Size := System.Drawing.Size.Create(151, 37);
Self.Button13.TabIndex := 13;
Self.Button13.Text := 'CD-ROM Bilgilerini Al';
Include(Self.Button13.Click, Self.Button13_Click);
//
// TWinForm1
//
Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
Self.ClientSize := System.Drawing.Size.Create(616, 643);
Self.Controls.Add(Self.Button13);
Self.Controls.Add(Self.Button12);
Self.Controls.Add(Self.Button11);
Self.Controls.Add(Self.Button10);
Self.Controls.Add(Self.Button9);
Self.Controls.Add(Self.Button8);
Self.Controls.Add(Self.Button7);
Self.Controls.Add(Self.Button6);
Self.Controls.Add(Self.Button5);
Self.Controls.Add(Self.Button4);
Self.Controls.Add(Self.Button3);
Self.Controls.Add(Self.Button2);
Self.Controls.Add(Self.Button1);
Self.Controls.Add(Self.pGrid);
Self.Name := 'TWinForm1';
Self.Text := 'WinForm1';
Self.ResumeLayout(False);
end;
{$ENDREGION}
procedure TWinForm1.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor TWinForm1.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
// TODO: Add any constructor code after InitializeComponent call
//
end;
procedure TWinForm1.Button13_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mCDRom : ManagementObject;
myCDRom : TCDRom;
begin
myCDRom := TCDRom.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_CDROMDrive');
for mCDRom in Searcher.Get do
begin
myCDRom.Availability := mCDRom['Availability'];
myCDRom.Caption := mCDRom['Caption'];
myCDRom.CompressionMethod := mCDRom['CompressionMethod'];
myCDRom.ConfigManagerErrorCode := mCDRom['ConfigManagerErrorCode'];
myCDRom.ConfigManagerUserConfig := mCDRom['ConfigManagerUserConfig'];
myCDRom.CreationClassName := mCDRom['CreationClassName'];
myCDRom.DefaultBlockSize := mCDRom['DefaultBlockSize'];
myCDRom.Description := mCDRom['Description'];
myCDRom.DeviceID := mCDRom['DeviceID'];
myCDRom.Drive := mCDRom['Drive'];
myCDRom.DriveIntegrity := mCDRom['DriveIntegrity'];
myCDRom.ErrorCleared := mCDRom['ErrorCleared'];
myCDRom.ErrorDescription := mCDRom['ErrorDescription'];
myCDRom.ErrorMethodology := mCDRom['ErrorMethodology'];
myCDRom.FileSystemFlags := mCDRom['FileSystemFlags'];
myCDRom.FileSystemFlagsEx := mCDRom['FileSystemFlagsEx'];
myCDRom.Id := mCDRom['Id'];
myCDRom.InstallDate := mCDRom['InstallDate'];
myCDRom.LastErrorCode := mCDRom['LastErrorCode'];
myCDRom.Manufacturer := mCDRom['Manufacturer'];
myCDRom.MaxBlockSize := mCDRom['MaxBlockSize'];
myCDRom.MaximumComponentLength := mCDRom['MaximumComponentLength'];
myCDRom.MaxMediaSize := mCDRom['MaxMediaSize'];
myCDRom.MediaLoaded := mCDRom['MediaLoaded'];
myCDRom.MediaType := mCDRom['MediaType'];
myCDRom.MfrAssignedRevisionLevel := mCDRom['MfrAssignedRevisionLevel'];
myCDRom.MinBlockSize := mCDRom['MinBlockSize'];
myCDRom.Name := mCDRom['Name'];
myCDRom.NeedsCleaning := mCDRom['NeedsCleaning'];
myCDRom.NumberOfMediaSupported := mCDRom['NumberOfMediaSupported'];
myCDRom.PNPDeviceID := mCDRom['PNPDeviceID'];
myCDRom.PowerManagementSupported := mCDRom['PowerManagementSupported'];
myCDRom.RevisionLevel := mCDRom['RevisionLevel'];
myCDRom.SCSIBus := mCDRom['SCSIBus'];
myCDRom.SCSILogicalUnit := mCDRom['SCSILogicalUnit'];
myCDRom.SCSIPort := mCDRom['SCSIPort'];
myCDRom.SCSITargetId := mCDRom['SCSITargetId'];
try
myCDRom.SerialNumber := mCDRom['SerialNumber'];
except
end;
myCDRom.Size := mCDRom['Size'];
myCDRom.Status := mCDRom['Status'];
myCDRom.StatusInfo := mCDRom['StatusInfo'];
myCDRom.SystemCreationClassName := mCDRom['SystemCreationClassName'];
myCDRom.SystemName := mCDRom['SystemName'];
myCDRom.TransferRate := mCDRom['TransferRate'];
myCDRom.VolumeName := mCDRom['VolumeName'];
myCDRom.VolumeSerialNumber := mCDRom['VolumeSerialNumber'];
pGrid.SelectedObject := myCDRom;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myCDRom;
pGrid.Refresh;
end;
procedure TWinForm1.Button12_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mFanProperties : ManagementObject;
myFanProperties : TFanProperties;
begin
myFanProperties := TFanProperties.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Fan');
for mFanProperties in Searcher.Get do
begin
myFanProperties.ActiveCooling := mFanProperties['ActiveCooling'];
myFanProperties.Availability := mFanProperties['Availability'];
myFanProperties.Caption := mFanProperties['Caption'];
myFanProperties.ConfigManagerErrorCode := mFanProperties['ConfigManagerErrorCode'];
myFanProperties.ConfigManagerUserConfig := mFanProperties['ConfigManagerUserConfig'];
myFanProperties.CreationClassName := mFanProperties['CreationClassName'];
myFanProperties.Description := mFanProperties['Description'];
myFanProperties.DesiredSpeed := mFanProperties['DesiredSpeed'];
myFanProperties.DeviceID := mFanProperties['DeviceID'];
myFanProperties.ErrorCleared := mFanProperties['ErrorCleared'];
myFanProperties.ErrorDescription := mFanProperties['ErrorDescription'];
myFanProperties.InstallDate := mFanProperties['InstallDate'];
myFanProperties.LastErrorCode := mFanProperties['LastErrorCode'];
myFanProperties.Name := mFanProperties['Name'];
myFanProperties.PNPDeviceID := mFanProperties['PNPDeviceID'];
myFanProperties.PowerManagementSupported := mFanProperties['PowerManagementSupported'];
myFanProperties.Status := mFanProperties['Status'];
myFanProperties.StatusInfo := mFanProperties['StatusInfo'];
myFanProperties.SystemCreationClassName := mFanProperties['SystemCreationClassName'];
myFanProperties.SystemName := mFanProperties['SystemName'];
myFanProperties.VariableSpeed := mFanProperties['VariableSpeed'];
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myFanProperties;
pGrid.Refresh;
end;
procedure TWinForm1.Button11_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mKeyboard : ManagementObject;
myKeyboard : TKeyboard;
begin
myKeyboard := TKeyboard.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Keyboard');
for mKeyboard in Searcher.Get do
begin
myKeyboard.Availability := mKeyboard['Availability'];
myKeyboard.Caption := mKeyboard['Caption'];
myKeyboard.ConfigManagerErrorCode := mKeyboard['ConfigManagerErrorCode'];
myKeyboard.ConfigManagerUserConfig := mKeyboard['ConfigManagerUserConfig'];
myKeyboard.CreationClassName := mKeyboard['CreationClassName'];
myKeyboard.Description := mKeyboard['Description'];
myKeyboard.DeviceID := mKeyboard['DeviceID'];
myKeyboard.ErrorCleared := mKeyboard['ErrorCleared'];
myKeyboard.ErrorDescription := mKeyboard['ErrorDescription'];
myKeyboard.InstallDate := mKeyboard['InstallDate'];
myKeyboard.IsLocked := mKeyboard['IsLocked'];
myKeyboard.LastErrorCode := mKeyboard['LastErrorCode'];
myKeyboard.Layout := mKeyboard['Layout'];
myKeyboard.Name := mKeyboard['Name'];
myKeyboard.NumberOfFunctionKeys := mKeyboard['NumberOfFunctionKeys'];
myKeyboard.Password := mKeyboard['Password'];
myKeyboard.PNPDeviceID := mKeyboard['PNPDeviceID'];
myKeyboard.PowerManagementSupported := mKeyboard['PowerManagementSupported'];
myKeyboard.Status := mKeyboard['Status'];
myKeyboard.StatusInfo := mKeyboard['StatusInfo'];
myKeyboard.SystemCreationClassName := mKeyboard['SystemCreationClassName'];
myKeyboard.SystemName := mKeyboard['SystemName'];
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myKeyboard;
pGrid.Refresh;
end;
procedure TWinForm1.Button10_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mServiceList : ManagementObject;
myServiceList : TServiceList;
begin
myServiceList := TServiceList.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Service');
for mServiceList in Searcher.Get do
begin
myServiceList.AcceptPause := mServiceList['AcceptPause'];
myServiceList.AcceptStop := mServiceList['AcceptStop'];
myServiceList.Caption := mServiceList['Caption'];
myServiceList.CheckPoint := mServiceList['CheckPoint'];
myServiceList.CreationClassName := mServiceList['CreationClassName'];
myServiceList.Description := mServiceList['Description'];
myServiceList.DesktopInteract := mServiceList['DesktopInteract'];
myServiceList.DisplayName := mServiceList['DisplayName'];
myServiceList.ErrorControl := mServiceList['ErrorControl'];
myServiceList.ExitCode := mServiceList['ExitCode'];
myServiceList.InstallDate := mServiceList['InstallDate'];
myServiceList.Name := mServiceList['Name'];
myServiceList.PathName := mServiceList['PathName'];
myServiceList.ProcessId := mServiceList['ProcessId'];
myServiceList.ServiceSpecificExitCode := mServiceList['ServiceSpecificExitCode'];
myServiceList.ServiceType := mServiceList['ServiceType'];
myServiceList.Started := mServiceList['Started'];
myServiceList.StartMode := mServiceList['StartMode'];
myServiceList.StartName := mServiceList['StartName'];
myServiceList.State := mServiceList['State'];
myServiceList.Status := mServiceList['Status'];
myServiceList.SystemCreationClassName := mServiceList['SystemCreationClassName'];
myServiceList.SystemName := mServiceList['SystemName'];
myServiceList.TagId := mServiceList['TagId'];
myServiceList.WaitHint := mServiceList['WaitHint'];
pGrid.SelectedObject := myServiceList;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myServiceList;
pGrid.Refresh;
end;
procedure TWinForm1.Button9_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mProcessList : ManagementObject;
myProcessList : TProcessList;
begin
myProcessList := TProcessList.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Process');
for mProcessList in Searcher.Get do
begin
myProcessList.Caption := mProcessList['Caption'];
myProcessList.CommandLine := mProcessList['CommandLine'];
myProcessList.CreationClassName := mProcessList['CreationClassName'];
myProcessList.CreationDate := mProcessList['CreationDate'];
myProcessList.CSCreationClassName := mProcessList['CSCreationClassName'];
myProcessList.CSName := mProcessList['CSName'];
myProcessList.Description := mProcessList['Description'];
myProcessList.ExecutablePath := mProcessList['ExecutablePath'];
myProcessList.ExecutionState := mProcessList['ExecutionState'];
myProcessList.Handle := mProcessList['Handle'];
myProcessList.HandleCount := mProcessList['HandleCount'];
myProcessList.InstallDate := mProcessList['InstallDate'];
myProcessList.KernelModeTime := mProcessList['KernelModeTime'];
myProcessList.MaximumWorkingSetSize := mProcessList['MaximumWorkingSetSize'];
myProcessList.MinimumWorkingSetSize := mProcessList['MinimumWorkingSetSize'];
myProcessList.Name := mProcessList['Name'];
myProcessList.OSCreationClassName := mProcessList['OSCreationClassName'];
myProcessList.OSName := mProcessList['OSName'];
myProcessList.OtherOperationCount := mProcessList['OtherOperationCount'];
myProcessList.OtherTransferCount := mProcessList['OtherTransferCount'];
myProcessList.PageFaults := mProcessList['PageFaults'];
myProcessList.PageFileUsage := mProcessList['PageFileUsage'];
myProcessList.ParentProcessId := mProcessList['ParentProcessId'];
myProcessList.PeakPageFileUsage := mProcessList['PeakPageFileUsage'];
myProcessList.PeakVirtualSize := mProcessList['PeakVirtualSize'];
myProcessList.PeakWorkingSetSize := mProcessList['PeakWorkingSetSize'];
myProcessList.Priority := mProcessList['Priority'];
myProcessList.PrivatePageCount := mProcessList['PrivatePageCount'];
myProcessList.ProcessId := mProcessList['ProcessId'];
myProcessList.QuotaNonPagedPoolUsage := mProcessList['QuotaNonPagedPoolUsage'];
myProcessList.QuotaPagedPoolUsage := mProcessList['QuotaPagedPoolUsage'];
myProcessList.QuotaPeakNonPagedPoolUsage := mProcessList['QuotaPeakNonPagedPoolUsage'];
myProcessList.QuotaPeakPagedPoolUsage := mProcessList['QuotaPeakPagedPoolUsage'];
myProcessList.ReadOperationCount := mProcessList['ReadOperationCount'];
myProcessList.ReadTransferCount := mProcessList['ReadTransferCount'];
myProcessList.SessionId := mProcessList['SessionId'];
myProcessList.Status := mProcessList['Status'];
myProcessList.TerminationDate := mProcessList['TerminationDate'];
myProcessList.ThreadCount := mProcessList['ThreadCount'];
myProcessList.UserModeTime := mProcessList['UserModeTime'];
myProcessList.VirtualSize := mProcessList['VirtualSize'];
myProcessList.WindowsVersion := mProcessList['WindowsVersion'];
myProcessList.WorkingSetSize := mProcessList['WorkingSetSize'];
myProcessList.WriteOperationCount := mProcessList['WriteOperationCount'];
myProcessList.WriteTransferCount := mProcessList['WriteTransferCount'];
pGrid.SelectedObject := myProcessList;
pGrid.Refresh;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myProcessList;
pGrid.Refresh;
end;
procedure TWinForm1.Button8_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mOperatingSystem : ManagementObject;
myOperatingSystem : TOperatingSystem;
begin
myOperatingSystem := TOperatingSystem.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_OperatingSystem');
for mOperatingSystem in Searcher.Get do
begin
myOperatingSystem.BootDevice := mOperatingSystem['BootDevice'];
myOperatingSystem.BuildNumber := mOperatingSystem['BuildNumber'];
myOperatingSystem.BuildType := mOperatingSystem['BuildType'];
myOperatingSystem.Caption := mOperatingSystem['Caption'];
myOperatingSystem.CodeSet := mOperatingSystem['CodeSet'];
myOperatingSystem.CountryCode := mOperatingSystem['CountryCode'];
myOperatingSystem.CreationClassName := mOperatingSystem['CreationClassName'];
myOperatingSystem.CSCreationClassName := mOperatingSystem['CSCreationClassName'];
myOperatingSystem.CSDVersion := mOperatingSystem['CSDVersion'];
myOperatingSystem.CSName := mOperatingSystem['CSName'];
myOperatingSystem.CurrentTimeZone := mOperatingSystem['CurrentTimeZone'];
myOperatingSystem.DataExecutionPrevention_32BitApplications := mOperatingSystem['DataExecutionPrevention_32BitApplications'];
myOperatingSystem.DataExecutionPrevention_Available := mOperatingSystem['DataExecutionPrevention_Available'];
myOperatingSystem.DataExecutionPrevention_Drivers := mOperatingSystem['DataExecutionPrevention_Drivers'];
myOperatingSystem.DataExecutionPrevention_SupportPolicy := mOperatingSystem['DataExecutionPrevention_SupportPolicy'];
myOperatingSystem.Debug := mOperatingSystem['Debug'];
myOperatingSystem.Description := mOperatingSystem['Description'];
myOperatingSystem.Distributed := mOperatingSystem['Distributed'];
myOperatingSystem.EncryptionLevel := mOperatingSystem['EncryptionLevel'];
myOperatingSystem.ForegroundApplicationBoost := mOperatingSystem['ForegroundApplicationBoost'];
myOperatingSystem.FreePhysicalMemory := mOperatingSystem['FreePhysicalMemory'];
myOperatingSystem.FreeSpaceInPagingFiles := mOperatingSystem['FreeSpaceInPagingFiles'];
myOperatingSystem.FreeVirtualMemory := mOperatingSystem['FreeVirtualMemory'];
myOperatingSystem.InstallDate := mOperatingSystem['InstallDate'];
myOperatingSystem.LargeSystemCache := mOperatingSystem['LargeSystemCache'];
myOperatingSystem.LastBootUpTime := mOperatingSystem['LastBootUpTime'];
myOperatingSystem.LocalDateTime := mOperatingSystem['LocalDateTime'];
myOperatingSystem.Locale := mOperatingSystem['Locale'];
myOperatingSystem.Manufacturer := mOperatingSystem['Manufacturer'];
myOperatingSystem.MaxNumberOfProcesses := mOperatingSystem['MaxNumberOfProcesses'];
myOperatingSystem.MaxProcessMemorySize := mOperatingSystem['MaxProcessMemorySize'];
myOperatingSystem.Name := mOperatingSystem['Name'];
myOperatingSystem.NumberOfLicensedUsers := mOperatingSystem['NumberOfLicensedUsers'];
myOperatingSystem.NumberOfProcesses := mOperatingSystem['NumberOfProcesses'];
myOperatingSystem.NumberOfUsers := mOperatingSystem['NumberOfUsers'];
myOperatingSystem.Organization := mOperatingSystem['Organization'];
try
myOperatingSystem.OSArchitecture := mOperatingSystem['OSArchitecture'];
except
end;
myOperatingSystem.OSLanguage := mOperatingSystem['OSLanguage'];
myOperatingSystem.OSProductSuite := mOperatingSystem['OSProductSuite'];
myOperatingSystem.OSType := mOperatingSystem['OSType'];
myOperatingSystem.OtherTypeDescription := mOperatingSystem['OtherTypeDescription'];
try
myOperatingSystem.PAEEnabled := mOperatingSystem['PAEEnabled'];
except
end;
myOperatingSystem.PlusProductID := mOperatingSystem['PlusProductID'];
myOperatingSystem.PlusVersionNumber := mOperatingSystem['PlusVersionNumber'];
myOperatingSystem.Primary := mOperatingSystem['Primary'];
myOperatingSystem.ProductType := mOperatingSystem['ProductType'];
myOperatingSystem.QuantumLength := mOperatingSystem['QuantumLength'];
myOperatingSystem.QuantumType := mOperatingSystem['QuantumType'];
myOperatingSystem.RegisteredUser := mOperatingSystem['RegisteredUser'];
myOperatingSystem.SerialNumber := mOperatingSystem['SerialNumber'];
myOperatingSystem.ServicePackMajorVersion := mOperatingSystem['ServicePackMajorVersion'];
myOperatingSystem.ServicePackMinorVersion := mOperatingSystem['ServicePackMinorVersion'];
myOperatingSystem.SizeStoredInPagingFiles := mOperatingSystem['SizeStoredInPagingFiles'];
myOperatingSystem.Status := mOperatingSystem['Status'];
myOperatingSystem.SuiteMask := mOperatingSystem['SuiteMask'];
myOperatingSystem.SystemDevice := mOperatingSystem['SystemDevice'];
myOperatingSystem.SystemDirectory := mOperatingSystem['SystemDirectory'];
myOperatingSystem.SystemDrive := mOperatingSystem['SystemDrive'];
myOperatingSystem.TotalSwapSpaceSize := mOperatingSystem['TotalSwapSpaceSize'];
myOperatingSystem.TotalVirtualMemorySize := mOperatingSystem['TotalVirtualMemorySize'];
myOperatingSystem.TotalVisibleMemorySize := mOperatingSystem['TotalVisibleMemorySize'];
myOperatingSystem.Version := mOperatingSystem['Version'];
myOperatingSystem.WindowsDirectory := mOperatingSystem['WindowsDirectory'];
try
myOperatingSystem.WOWEnvironment := mOperatingSystem['WOWEnvironment'];
except
end;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myOperatingSystem;
pGrid.Refresh;
end;
procedure TWinForm1.Button7_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mComputerSystem : ManagementObject;
myComputerSystem : TComputerSystem;
begin
myComputerSystem := TComputerSystem.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_ComputerSystem');
for mComputerSystem in Searcher.Get do
begin
myComputerSystem.AdminPasswordStatus := mComputerSystem['AdminPasswordStatus'];
try
myComputerSystem.AutomaticManagedPagefile := mComputerSystem['AutomaticManagedPagefile'];
except
end;
myComputerSystem.AutomaticResetBootOption := mComputerSystem['AutomaticResetBootOption'];
myComputerSystem.AutomaticResetCapability := mComputerSystem['AutomaticResetCapability'];
myComputerSystem.BootOptionOnLimit := mComputerSystem['BootOptionOnLimit'];
myComputerSystem.BootOptionOnWatchDog := mComputerSystem['BootOptionOnWatchDog'];
myComputerSystem.BootROMSupported := mComputerSystem['BootROMSupported'];
myComputerSystem.BootupState := mComputerSystem['BootupState'];
myComputerSystem.Caption := mComputerSystem['Caption'];
myComputerSystem.ChassisBootupState := mComputerSystem['ChassisBootupState'];
myComputerSystem.CreationClassName := mComputerSystem['CreationClassName'];
myComputerSystem.CurrentTimeZone := mComputerSystem['CurrentTimeZone'];
myComputerSystem.DaylightInEffect := mComputerSystem['DaylightInEffect'];
myComputerSystem.Description := mComputerSystem['Description'];
try
myComputerSystem.DNSHostName := mComputerSystem['DNSHostName'];
except
end;
myComputerSystem.Domain := mComputerSystem['Domain'];
myComputerSystem.DomainRole := mComputerSystem['DomainRole'];
myComputerSystem.EnableDaylightSavingsTime := mComputerSystem['EnableDaylightSavingsTime'];
myComputerSystem.FrontPanelResetStatus := mComputerSystem['FrontPanelResetStatus'];
myComputerSystem.InfraredSupported := mComputerSystem['InfraredSupported'];
myComputerSystem.InitialLoadInfo := mComputerSystem['InitialLoadInfo'];
myComputerSystem.InstallDate := mComputerSystem['InstallDate'];
myComputerSystem.KeyboardPasswordStatus := mComputerSystem['KeyboardPasswordStatus'];
myComputerSystem.LastLoadInfo := mComputerSystem['LastLoadInfo'];
myComputerSystem.Manufacturer := mComputerSystem['Manufacturer'];
myComputerSystem.Model := mComputerSystem['Model'];
myComputerSystem.Name := mComputerSystem['Name'];
myComputerSystem.NameFormat := mComputerSystem['NameFormat'];
myComputerSystem.NetworkServerModeEnabled := mComputerSystem['NetworkServerModeEnabled'];
try
myComputerSystem.NumberOfLogicalProcessors := mComputerSystem['NumberOfLogicalProcessors'];
except
end;
myComputerSystem.NumberOfProcessors := mComputerSystem['NumberOfProcessors'];
myComputerSystem.PartOfDomain := mComputerSystem['PartOfDomain'];
myComputerSystem.PauseAfterReset := mComputerSystem['PauseAfterReset'];
try
myComputerSystem.PCSystemType := mComputerSystem['PCSystemType'];
except
end;
myComputerSystem.PowerManagementSupported := mComputerSystem['PowerManagementSupported'];
myComputerSystem.PowerOnPasswordStatus := mComputerSystem['PowerOnPasswordStatus'];
myComputerSystem.PowerState := mComputerSystem['PowerState'];
myComputerSystem.PowerSupplyState := mComputerSystem['PowerSupplyState'];
myComputerSystem.PrimaryOwnerContact := mComputerSystem['PrimaryOwnerContact'];
myComputerSystem.PrimaryOwnerName := mComputerSystem['PrimaryOwnerName'];
myComputerSystem.ResetCapability := mComputerSystem['ResetCapability'];
myComputerSystem.ResetCount := mComputerSystem['ResetCount'];
myComputerSystem.ResetLimit := mComputerSystem['ResetLimit'];
myComputerSystem.Status := mComputerSystem['Status'];
myComputerSystem.SystemStartupDelay := mComputerSystem['SystemStartupDelay'];
myComputerSystem.SystemStartupSetting := mComputerSystem['SystemStartupSetting'];
myComputerSystem.SystemType := mComputerSystem['SystemType'];
myComputerSystem.ThermalState := mComputerSystem['ThermalState'];
myComputerSystem.TotalPhysicalMemory := mComputerSystem['TotalPhysicalMemory'];
myComputerSystem.UserName := mComputerSystem['UserName'];
myComputerSystem.WakeUpType := mComputerSystem['WakeUpType'];
myComputerSystem.Workgroup := mComputerSystem['Workgroup'];
end;
pGrid.SelectedObject := myComputerSystem;
pGrid.Refresh;
end;
procedure TWinForm1.Button6_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mBootConfiguration : ManagementObject;
myBootConfiguration : TBootConfiguration;
begin
myBootConfiguration := TBootConfiguration.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_BootConfiguration');
for mBootConfiguration in Searcher.Get do
begin
myBootConfiguration.BootDirectory := mBootConfiguration['BootDirectory'];
myBootConfiguration.Caption := mBootConfiguration['Caption'];
myBootConfiguration.ConfigurationPath := mBootConfiguration['ConfigurationPath'];
myBootConfiguration.Description := mBootConfiguration['Description'];
myBootConfiguration.LastDrive := mBootConfiguration['LastDrive'];
myBootConfiguration.Name := mBootConfiguration['Name'];
myBootConfiguration.ScratchDirectory := mBootConfiguration['ScratchDirectory'];
myBootConfiguration.SettingID := mBootConfiguration['SettingID'];
myBootConfiguration.TempDirectory := mBootConfiguration['TempDirectory'];
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myBootConfiguration;
pGrid.Refresh;
end;
procedure TWinForm1.Button5_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mCodec : ManagementObject;
myCodec : TCodecFile;
begin
myCodec := TCodecFile.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_CodecFile');
for mCodec in Searcher.Get do
begin
myCodec.AccessMask := mCodec['AccessMask'];
myCodec.Archive := mCodec['Archive'];
myCodec.Caption := mCodec['Caption'];
myCodec.Compressed := mCodec['Compressed'];
myCodec.CompressionMethod := mCodec['CompressionMethod'];
myCodec.CreationClassName := mCodec['CreationClassName'];
myCodec.CreationDate := mCodec['CreationDate'];
myCodec.CSCreationClassName := mCodec['CSCreationClassName'];
myCodec.CSName := mCodec['CSName'];
myCodec.Description := mCodec['Description'];
myCodec.Drive := mCodec['Drive'];
myCodec.EightDotThreeFileName := mCodec['EightDotThreeFileName'];
myCodec.Encrypted := mCodec['Encrypted'];
myCodec.EncryptionMethod := mCodec['EncryptionMethod'];
myCodec.Extension := mCodec['Extension'];
myCodec.FileName := mCodec['FileName'];
myCodec.FileSize := mCodec['FileSize'];
myCodec.FileType := mCodec['FileType'];
myCodec.FSCreationClassName := mCodec['FSCreationClassName'];
myCodec.FSName := mCodec['FSName'];
myCodec.Group := mCodec['Group'];
myCodec.Hidden := mCodec['Hidden'];
myCodec.InstallDate := mCodec['InstallDate'];
myCodec.InUseCount := mCodec['InUseCount'];
myCodec.LastAccessed := mCodec['LastAccessed'];
myCodec.LastModified := mCodec['LastModified'];
myCodec.Manufacturer := mCodec['Manufacturer'];
myCodec.Name := mCodec['Name'];
myCodec.Path := mCodec['Path'];
myCodec.Readable := mCodec['Readable'];
myCodec.Status := mCodec['Status'];
myCodec.System := mCodec['System'];
myCodec.Version := mCodec['Version'];
myCodec.Writeable := mCodec['Writeable'];
pGrid.SelectedObject := myCodec;
pGrid.Refresh;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myCodec;
pGrid.Refresh;
end;
procedure TWinForm1.Button4_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mPartition : ManagementObject;
myPartition : TDiskPartition;
begin
myPartition := TDiskPartition.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_DiskPartition');
for mPartition in Searcher.Get do
begin
myPartition.Access := mPartition['Access'];
myPartition.Availability := mPartition['Availability'];
myPartition.BlockSize := mPartition['BlockSize'];
myPartition.Bootable := mPartition['Bootable'];
myPartition.BootPartition := mPartition['BootPartition'];
myPartition.Caption := mPartition['Caption'];
myPartition.ConfigManagerErrorCode := mPartition['ConfigManagerErrorCode'];
myPartition.ConfigManagerUserConfig := mPartition['ConfigManagerUserConfig'];
myPartition.CreationClassName := mPartition['CreationClassName'];
myPartition.Description := mPartition['Description'];
myPartition.DeviceID := mPartition['DeviceID'];
myPartition.DiskIndex := mPartition['DiskIndex'];
myPartition.ErrorCleared := mPartition['ErrorCleared'];
myPartition.ErrorDescription := mPartition['ErrorDescription'];
myPartition.ErrorMethodology := mPartition['ErrorMethodology'];
myPartition.HiddenSectors := mPartition['HiddenSectors'];
myPartition.Index_ := mPartition['Index'];
myPartition.InstallDate := mPartition['InstallDate'];
myPartition.LastErrorCode := mPartition['LastErrorCode'];
myPartition.Name := mPartition['Name'];
myPartition.NumberOfBlocks := mPartition['NumberOfBlocks'];
myPartition.PNPDeviceID := mPartition['PNPDeviceID'];
myPartition.PowerManagementSupported := mPartition['PowerManagementSupported'];
myPartition.PrimaryPartition := mPartition['PrimaryPartition'];
myPartition.Purpose := mPartition['Purpose'];
myPartition.RewritePartition := mPartition['RewritePartition'];
myPartition.Size := mPartition['Size'];
myPartition.StartingOffset := mPartition['StartingOffset'];
myPartition.Status := mPartition['Status'];
myPartition.StatusInfo := mPartition['StatusInfo'];
myPartition.SystemCreationClassName := mPartition['SystemCreationClassName'];
myPartition.SystemName := mPartition['SystemName'];
myPartition.Type_ := mPartition['Type'];
pGrid.SelectedObject := myPartition;
pGrid.Refresh;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myPartition;
pGrid.Refresh;
end;
procedure TWinForm1.Button3_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mEnvironment : ManagementObject;
myEnvironment : TEnvironment;
begin
myEnvironment := TEnvironment.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Environment');
for mEnvironment in Searcher.Get do
begin
myEnvironment.Caption := mEnvironment['Caption'];
myEnvironment.Description := mEnvironment['Description'];
myEnvironment.InstallDate := mEnvironment['InstallDate'];
myEnvironment.Name := mEnvironment['Name'];
myEnvironment.Status := mEnvironment['Status'];
myEnvironment.SystemVariable := mEnvironment['SystemVariable'];
myEnvironment.UserName := mEnvironment['UserName'];
myEnvironment.VariableValue := mEnvironment['VariableValue'];
pGrid.SelectedObject := myEnvironment;
pGrid.Refresh;
MessageBox.Show('Biraz bekleyelim');
end;
pGrid.SelectedObject := myEnvironment;
pGrid.Refresh;
end;
procedure TWinForm1.Button2_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mDesktop : ManagementObject;
myDesktop : TDesktop;
begin
myDesktop := TDesktop.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_Desktop');
for mDesktop in Searcher.Get do
begin
myDesktop.BorderWidth := mDesktop['BorderWidth'];
myDesktop.Caption := mDesktop['Caption'];
myDesktop.CoolSwitch := mDesktop['CoolSwitch'];
myDesktop.CursorBlinkRate := mDesktop['CursorBlinkRate'];
myDesktop.Description := mDesktop['Description'];
myDesktop.DragFullWindows := mDesktop['DragFullWindows'];
myDesktop.GridGranularity := mDesktop['GridGranularity'];
myDesktop.IconSpacing := mDesktop['IconSpacing'];
myDesktop.IconTitleFaceName := mDesktop['IconTitleFaceName'];
myDesktop.IconTitleSize := mDesktop['IconTitleSize'];
myDesktop.IconTitleWrap := mDesktop['IconTitleWrap'];
myDesktop.Name := mDesktop['Name'];
myDesktop.Pattern := mDesktop['Pattern'];
myDesktop.ScreenSaverActive := mDesktop['ScreenSaverActive'];
myDesktop.ScreenSaverExecutable := mDesktop['ScreenSaverExecutable'];
myDesktop.ScreenSaverSecure := mDesktop['ScreenSaverSecure'];
myDesktop.ScreenSaverTimeout := mDesktop['ScreenSaverTimeout'];
myDesktop.SettingID := mDesktop['SettingID'];
myDesktop.Wallpaper := mDesktop['Wallpaper'];
myDesktop.WallpaperStretched := mDesktop['WallpaperStretched'];
myDesktop.WallpaperTiled := mDesktop['WallpaperTiled'];
end;
pGrid.SelectedObject := myDesktop;
pGrid.Refresh;
end;
procedure TWinForm1.Button1_Click(sender: System.Object; e: System.EventArgs);
var
Searcher : ManagementObjectSearcher;
mBios : ManagementObject;
myBIOS : TBIOS;
begin
myBIOS := TBIOS.Create;
Searcher := ManagementObjectSearcher.Create('SELECT * FROM Win32_BIOS');
for mBios in Searcher.Get do
begin
myBios.BiosVersion := &String(mBios['BIOSVersion']);
myBios.BuildNumber := &String(mBios['BuildNumber']);
myBios.Caption := &String(mBios['Caption']);
myBios.CodeSet := &String(mBios['CodeSet']);
myBios.CurrentLang := &String(mBios['CurrentLanguage']);
myBios.Description := &String(mBios['Description']);
myBios.IdentificationCode := &String(mBios['IdentificationCode']);
myBios.InstallableLanguages := UInt16(mBios['InstallableLanguages']);
try
if mBios['InstallDate'] nil
then myBios.InstallDate := DateTime(mBios['InstallDate']);
except
end;
myBios.LanguageEdition := &String(mBios['LanguageEdition']);
myBios.Manufacturer := &String(mBios['Manufacturer']);
myBios.BiosName := &String(mBios['Name']);
myBios.OtherTargetOS := &String(mBios['OtherTargetOS']);
myBios.PrimaryBios := Boolean(mBios['PrimaryBIOS']);
try
if mBios['ReleaseDate'] nil
then myBios.ReleaseDate := &DateTime(mBios['ReleaseDate']);
except
end;
myBios.SerialNumber := &String(mBios['SerialNumber']);
myBios.SMBIOSBIOSVersion := &String(mBios['SMBIOSBIOSVersion']);
myBios.SMBIOSMajorVersion := UInt16(mBios['SMBIOSMajorVersion']);
myBios.SMBIOSMinorVersion := UInt16(mBios['SMBIOSMinorVersion']);
myBios.SMBIOSPresent := Boolean(mBios['SMBIOSPresent']);
myBios.SoftwareElementID := &String(mBios['SoftwareElementID']);
myBios.SoftwareElementState := UInt16(mBios['SoftwareElementState']);
myBios.Status := &String(mBios['Status']);
myBios.TargetOperatingSystem := UInt16(mBios['TargetOperatingSystem']);
myBios.Version := &String(mBios['Version']);
end;
pGrid.SelectedObject := myBIOS;
pGrid.Refresh;
end;
end.
Saygılar, sevgiler..
Tuğrul HELVACI

Entries (RSS)
May 22nd, 2006 at 21:13:38
Arkadaşlar bazı yerlerde amp; gelmiş, ancak onlar olmayacak. Sanırım “&” işareti bu şekilde yorumlandı. “&” işaretinin kullanılması escape’dir. Siz “&” işaretlerini kullanmayabilirsiniz de..
Saygılar, sevgiler..
Tuğrul HELVACI
May 22nd, 2006 at 21:37:52
hocam eline sağlık. Bana biraz api işini anımsatıyor. Yoksa bu .NET’çesimi şimdi. Demek buymuş