Menu
Home
Products
  WmiSet Components
    Release History
    TWmiQuery
    TWmiProcessControl
    TWmiRegistry
    TWmiConnection
    TWmiStorageInfo
    TWmiDiskQuotaControl
    TWmiDiskKeeper
    TWmiSystemEvents
    TWmiMethod
    TWmiPerformanceMonitor
  NTSet components
  "How to" zone
  Shareware
  Full version
  Archive
  NTSet
  WmiSet
Contact us
Advanced search
Site map

Quick search

Advanced search

New version notify
e-mail address: Subscribe Unsubscribe
Privacy statement
TWmiOs component
TWmiOs is a part of WmiSet Component Collection for Delphi, C++Builder. This VCL component returns over 60 different settings of local or remote operating system. The component is also capable of changing date and time on a remote computer (Windows XP and higher), rebooting network computers, changing recovery settings. This is typical scenario of using the component:
  • Connect to the destination computer;
  • Read or change OS settings.
  • Disconnect.
The following code demonstrates this scenario. The code assumes that the component was dropped on the form at design time.
procedure TForm1.PerformTask;
begin
  WmiOs1.Credentials.UserName := 'DOMAIN\Administrator';
  WmiOs1.Credentials.Password := 'mypassword';
  // computer name will also work
  WmiOs1.MachineName := '10.8.26.76'; 
  WmiOs1.Active := true;
  // synchronize the time on remote Windows XP
  try
    WmiOs1.LocalDateTime := Now;

    // do something else
  finally
    WmiOs.Active := false;
  end;
end;
                
The first two lines are required only if current user does not have access to destination computer. The third line may be omitted when connecting to local computer. The following properties are supported, though some of them may return empty values under different Windows operating systems:

Property Description
BootDevice Returns name of the boot disk drive, for example: "\Device\HarddiskVolume1".
BuildNumber Returns the build number of an operating system. For example, Windows XP may return "2600".
BuildType Returns a text indication of build type, for example "retail build", "checked build", "Uniprocessor Free".
Caption Returns short description of operating system, for example, "Microsoft Windows XP Professional".
CodeSet Returns code page value an operating system uses, for example "1252".
CountryCode Returns the code for the country/region of an operating system.
CSDVersion Returns the description of the latest service pack installed on a computer system.
CSName Returns the name of computer system.
CurrentTimeZone Returns the offset of local time from Greenwich mean time (GMT).
Debug Indicates if the operating system is a checked (debug) build.
Description Returns the description of the Windows operating system, which is visible in the network browser.
Distributed Indicates if the operating system is distributed (cluster environment)
EncryptionLevel Returns the encryption level for secure transactions: 0-bit, 128-bit, 168-bit or n-bit.
ForegroundApplicationBoost Controls the priority given to the foreground application.
FreePhysicalMemory Returns size unused physical memory.
FreeSpaceInPagingFiles Returns a free space in the operating system paging file.
FreeVirtualMemory Returns size of unused virtual memory.
InstallDate Returns the date when an operating system was installed.
LargeSystemCache Indicates how an operating system optimizes the memory.
LastBootUpTime Indicates when the operating system was last booted.
LocalDateTime Returns operating system's local time.
Locale Indicates the language used by operating system.
LocalTimeZone Returns the time zone of the LocalDateTime
Manufacturer Returns the name of operating system manufacturer.
MaxNumberOfProcesses Returns the maximum number of process the operating system can support.
MaxProcessMemorySize Indicates the maximum amount of memory that may be allocated to a process.
NumberOfLicensedUsers Returns number of user licenses for the operating system.
NumberOfProcesses Returns a number of currently running processes.
NumberOfUsers Returns current number of user sessions.
Organization Returns name of the company used when registering operating system.
OSLanguage Returns the language version of the operating system, for example 409 for English (United States).
OSName Returns name and location of operating system on the computer, for example "Microsoft Windows XP Professional|C:\WINDOWS|\Device\Harddisk0\Partition3".
OSProductSuite Returns additional products on the operation system.
OSType Returns the type of operating system.
QuantumLength Controls the number of clock ticks per quantum.
QuantumType Controls the type of the quantum length.
QuickFixes Returns a list of updates applied to operating system.
Recovery Defines how system behaves after crash.
  AutoReboot Defines if the operating system automatically reboots after crash.
  DebugFilePath Defines the path to the debug file, for example %SystemRoot%\MEMORY.DMP.
  DebugInfoType Defines the type of debugging information written to the log file.
  ExpandedDebugFilePath Returns expanded version of DebugFilePath, for example C:\WINDOWS\MEMORY.DMP
  ExpandedMiniDumpDirectory Returns expanded version of the MiniDumpDirectory property, for example C:\WINDOWS\Minidump.
  KernelDumpOnly Specifies if only kernel debug information should be written to the debug log file.
  OverwriteExistingDebugFile Specifies if the new log file will overwrite an existing one.
  SendAdminAlert Indicates if alert message should be sent in the event of an operating system failure.
  WriteDebugInfo Specifies if debugging information is to be written to a log file.
  WriteToSystemLog Specifies if the events will be written to a system log.
RegisteredUser Returns the name of the registered user of the operating system.
SerialNumber Returns serial number of the operating system.
ServicePackMajorVersion Returns the major version number of the installed service pack.
ServicePackMajorVersion Returns the minor version number of the installed service pack.
SizeStoredInPagingFiles Returns the size of data that can be stored in the paging file.
Status Returns the current status of the operating system.
SuiteMask Indicates the product suites available on the system, for example Back Office, Terminal, Enterprise etc.
SystemDevice Returns the physical disk partition on which the operating system is installed, for example "\Device\HarddiskVolume3"
SystemDirectory Returns system directory of operating system, for example "C:\WINDOWS\SYSTEM32"
SystemDrive Returns the disk drive where operating system is installed, for example "C:"
TotalSwapSpaceSize Returns size of the swap file.
TotalVirtualMemorySize Returns total size of virtual memory.
TotalVisibleMemorySize Returns the size of physical memory available for operating system.
Version Returns version of the operating system, for example "4.0" or "5.1.2600".
WindowsDirectory Returns the directory of the operating system, for example "C:\WINDOWS".

The WmiSet collection comes with example that demonstrates how to use TWmiOs component. The example is build as OS Viewer that connects to remote PCs to view/modify operating system settings. Click here to download the compiled executable.