`

WMI类-所有可用的WMI的类封装

    博客分类:
  • C#
阅读更多
public class WMIClasses 
    { 
        private Hashtable _ClassHash=new Hashtable(); 
        public WMIClasses() 
        { 
            LoadWMIClasses(); 
        } 
 
        private void LoadWMIClasses() 
        { 
            _ClassHash.Clear(); 
            _ClassHash["计算机系统硬件"]=new Hashtable(); 
            Hashtable hash=(Hashtable)_ClassHash["计算机系统硬件"]; 
 
            hash["降温设备"]=new DataSet("降温设备"); 
            DataSet dataset=(DataSet)hash["降温设备"]; 
            dataset.Tables.Add(new DataTable("Win32_Fan")); 
            dataset.Tables.Add(new DataTable("Win32_HeatPipe")); 
            dataset.Tables.Add(new DataTable("Win32_Refrigeration")); 
            dataset.Tables.Add(new DataTable("Win32_TemperatureProbe")); 
 
            hash["输入设备"]=new DataSet("输入设备"); 
            dataset=(DataSet)hash["输入设备"]; 
            dataset.Tables.Add(new DataTable("Win32_Keyboard")); 
            dataset.Tables.Add(new DataTable("Win32_PointingDevice")); 
             
            hash["存储设备"]=new DataSet("存储设备"); 
            dataset=(DataSet)hash["存储设备"]; 
            dataset.Tables.Add(new DataTable("Win32_AutochkSetting")); 
            dataset.Tables.Add(new DataTable("Win32_CDROMDrive")); 
            dataset.Tables.Add(new DataTable("Win32_DiskDrive")); 
            dataset.Tables.Add(new DataTable("Win32_FloppyDrive")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_MappedLogicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_TapeDrive")); 
 
            hash["主板控制器及端口"]=new DataSet("主板控制器及端口"); 
            dataset=(DataSet)hash["主板控制器及端口"]; 
            dataset.Tables.Add(new DataTable("Win32_1394Controller")); 
            dataset.Tables.Add(new DataTable("Win32_1394ControllerDevice")); 
            dataset.Tables.Add(new DataTable("Win32_AllocatedResource")); 
            dataset.Tables.Add(new DataTable("Win32_AssociatedProcessorMemory")); 
            dataset.Tables.Add(new DataTable("Win32_BaseBoard")); 
            dataset.Tables.Add(new DataTable("Win32_BIOS")); 
            dataset.Tables.Add(new DataTable("Win32_Bus")); 
            dataset.Tables.Add(new DataTable("Win32_CacheMemory")); 
            dataset.Tables.Add(new DataTable("Win32_ControllerHasHub")); 
            dataset.Tables.Add(new DataTable("Win32_DeviceBus")); 
            dataset.Tables.Add(new DataTable("Win32_DeviceMemoryAddress")); 
            dataset.Tables.Add(new DataTable("Win32_DeviceSettings")); 
            dataset.Tables.Add(new DataTable("Win32_DMAChannel")); 
            dataset.Tables.Add(new DataTable("Win32_FloppyController")); 
            dataset.Tables.Add(new DataTable("Win32_IDEController")); 
            dataset.Tables.Add(new DataTable("Win32_IDEControllerDevice")); 
            dataset.Tables.Add(new DataTable("Win32_InfraredDevice")); 
            dataset.Tables.Add(new DataTable("Win32_IRQResource")); 
            dataset.Tables.Add(new DataTable("Win32_MemoryArray")); 
            dataset.Tables.Add(new DataTable("Win32_MemoryArrayLocation")); 
            dataset.Tables.Add(new DataTable("Win32_MemoryDevice")); 
            dataset.Tables.Add(new DataTable("Win32_MemoryDeviceArray")); 
            dataset.Tables.Add(new DataTable("Win32_MemoryDeviceLocation")); 
            dataset.Tables.Add(new DataTable("Win32_MotherboardDevice")); 
            dataset.Tables.Add(new DataTable("Win32_OnBoardDevice")); 
            dataset.Tables.Add(new DataTable("Win32_ParallelPort")); 
            dataset.Tables.Add(new DataTable("Win32_PCMCIAController")); 
            dataset.Tables.Add(new DataTable("Win32_PhysicalMemory")); 
            dataset.Tables.Add(new DataTable("Win32_PhysicalMemoryArray")); 
            dataset.Tables.Add(new DataTable("Win32_PhysicalMemoryLocation")); 
            dataset.Tables.Add(new DataTable("Win32_PNPAllocatedResource")); 
            dataset.Tables.Add(new DataTable("Win32_PNPDevice")); 
            dataset.Tables.Add(new DataTable("Win32_PNPEntity")); 
            dataset.Tables.Add(new DataTable("Win32_PortConnector")); 
            dataset.Tables.Add(new DataTable("Win32_PortResource")); 
            dataset.Tables.Add(new DataTable("Win32_Processor")); 
            dataset.Tables.Add(new DataTable("Win32_SCSIController")); 
            dataset.Tables.Add(new DataTable("Win32_SCSIControllerDevice")); 
            dataset.Tables.Add(new DataTable("Win32_SerialPort")); 
            dataset.Tables.Add(new DataTable("Win32_SerialPortConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_SerialPortSetting")); 
            dataset.Tables.Add(new DataTable("Win32_SMBIOSMemory")); 
            dataset.Tables.Add(new DataTable("Win32_SoundDevice")); 
            dataset.Tables.Add(new DataTable("Win32_SystemBIOS")); 
            dataset.Tables.Add(new DataTable("Win32_SystemDriverPNPEntity")); 
            dataset.Tables.Add(new DataTable("Win32_SystemEnclosure")); 
            dataset.Tables.Add(new DataTable("Win32_SystemMemoryResource")); 
            dataset.Tables.Add(new DataTable("Win32_SystemSlot")); 
            dataset.Tables.Add(new DataTable("Win32_USBController")); 
            dataset.Tables.Add(new DataTable("Win32_USBControllerDevice")); 
            dataset.Tables.Add(new DataTable("Win32_USBHub")); 
 
            hash["网络设备"]=new DataSet("网络设备"); 
            dataset=(DataSet)hash["网络设备"]; 
            dataset.Tables.Add(new DataTable("Win32_NetworkAdapter")); 
            dataset.Tables.Add(new DataTable("Win32_NetworkAdapterConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_NetworkAdapterSetting")); 
 
            hash["电源"]=new DataSet("电源"); 
            dataset=(DataSet)hash["电源"]; 
            dataset.Tables.Add(new DataTable("Win32_Battery")); 
            dataset.Tables.Add(new DataTable("Win32_CurrentProbe")); 
            dataset.Tables.Add(new DataTable("Win32_PortableBattery")); 
            dataset.Tables.Add(new DataTable("Win32_PowerManagementEvent")); 
            dataset.Tables.Add(new DataTable("Win32_UninterruptiblePowerSupply")); 
            dataset.Tables.Add(new DataTable("Win32_VoltageProbe")); 
 
            hash["打印设备"]=new DataSet("打印设备"); 
            dataset=(DataSet)hash["打印设备"]; 
            dataset.Tables.Add(new DataTable("Win32_DriverForDevice")); 
            dataset.Tables.Add(new DataTable("Win32_Printer")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterController")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterDriver")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterDriverDll")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterSetting")); 
            dataset.Tables.Add(new DataTable("Win32_PrintJob")); 
            dataset.Tables.Add(new DataTable("Win32_TCPIPPrinterPort")); 
 
            hash["电话设备"]=new DataSet("电话设备"); 
            dataset=(DataSet)hash["电话设备"]; 
            dataset.Tables.Add(new DataTable("Win32_POTSModem")); 
            dataset.Tables.Add(new DataTable("Win32_POTSModemToSerialPort")); 
 
            hash["视频和监视器"]=new DataSet("视频和监视器"); 
            dataset=(DataSet)hash["视频和监视器"]; 
            dataset.Tables.Add(new DataTable("Win32_DesktopMonitor")); 
            dataset.Tables.Add(new DataTable("Win32_DisplayConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_DisplayControllerConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_VideoConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_VideoController")); 
            dataset.Tables.Add(new DataTable("Win32_VideoSettings")); 
 
 
            _ClassHash["软件操作系统"]=new Hashtable(); 
            hash=(Hashtable)_ClassHash["软件操作系统"]; 
 
            hash["组件"]=new DataSet("组件"); 
            dataset=(DataSet)hash["组件"]; 
            dataset.Tables.Add(new DataTable("Win32_ClassicCOMApplicationClasses")); 
            dataset.Tables.Add(new DataTable("Win32_ClassicCOMClass")); 
            dataset.Tables.Add(new DataTable("Win32_ClassicCOMClassSettings")); 
            dataset.Tables.Add(new DataTable("Win32_ClientApplicationSetting")); 
            dataset.Tables.Add(new DataTable("Win32_COMApplication")); 
            dataset.Tables.Add(new DataTable("Win32_COMApplicationClasses")); 
            dataset.Tables.Add(new DataTable("Win32_COMApplicationSettings")); 
            dataset.Tables.Add(new DataTable("Win32_COMClass")); 
            dataset.Tables.Add(new DataTable("Win32_ComClassAutoEmulator")); 
            dataset.Tables.Add(new DataTable("Win32_ComClassEmulator")); 
            dataset.Tables.Add(new DataTable("Win32_ComponentCategory")); 
            dataset.Tables.Add(new DataTable("Win32_COMSetting")); 
            dataset.Tables.Add(new DataTable("Win32_DCOMApplication")); 
            dataset.Tables.Add(new DataTable("Win32_DCOMApplicationAccessAllowedSetting")); 
            dataset.Tables.Add(new DataTable("Win32_DCOMApplicationLaunchAllowedSetting")); 
            dataset.Tables.Add(new DataTable("Win32_DCOMApplicationSetting")); 
            dataset.Tables.Add(new DataTable("Win32_ImplementedCategory")); 
 
            hash["桌面"]=new DataSet("桌面"); 
            dataset=(DataSet)hash["桌面"]; 
            dataset.Tables.Add(new DataTable("Win32_Desktop")); 
            dataset.Tables.Add(new DataTable("Win32_Environment")); 
            dataset.Tables.Add(new DataTable("Win32_TimeZone")); 
            dataset.Tables.Add(new DataTable("Win32_UserDesktop")); 
 
            hash["驱动"]=new DataSet("驱动"); 
            dataset=(DataSet)hash["驱动"]; 
            dataset.Tables.Add(new DataTable("Win32_DriverVXD")); 
            dataset.Tables.Add(new DataTable("Win32_SystemDriver")); 
 
            hash["文件系统"]=new DataSet("文件系统"); 
            dataset=(DataSet)hash["文件系统"]; 
            dataset.Tables.Add(new DataTable("Win32_CIMLogicalDeviceCIMDataFile")); 
            dataset.Tables.Add(new DataTable("Win32_Directory")); 
            dataset.Tables.Add(new DataTable("Win32_DirectorySpecification")); 
            dataset.Tables.Add(new DataTable("Win32_DiskDriveToDiskPartition")); 
            dataset.Tables.Add(new DataTable("Win32_DiskPartition")); 
            dataset.Tables.Add(new DataTable("Win32_DiskQuota")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalDiskRootDirectory")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalDiskToPartition")); 
            dataset.Tables.Add(new DataTable("Win32_OperatingSystemAutochkSetting")); 
            dataset.Tables.Add(new DataTable("Win32_QuotaSetting")); 
            dataset.Tables.Add(new DataTable("Win32_ShortcutFile")); 
            dataset.Tables.Add(new DataTable("Win32_SubDirectory")); 
            dataset.Tables.Add(new DataTable("Win32_SystemPartitions")); 
            dataset.Tables.Add(new DataTable("Win32_VolumeQuotaSetting")); 
 
            hash["工作对象"]=new DataSet("工作对象"); 
            dataset=(DataSet)hash["工作对象"]; 
            dataset.Tables.Add(new DataTable("Win32_CollectionStatistics")); 
            dataset.Tables.Add(new DataTable("Win32_LUID")); 
            dataset.Tables.Add(new DataTable("Win32_LUIDandAttributes")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObject")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectActgInfo")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectLimit")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectLimitSetting")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectProcess")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectSecLimit")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectSecLimitSetting")); 
            dataset.Tables.Add(new DataTable("Win32_NamedJobObjectStatistics")); 
            dataset.Tables.Add(new DataTable("Win32_SIDandAttributes")); 
            dataset.Tables.Add(new DataTable("Win32_TokenGroups")); 
            dataset.Tables.Add(new DataTable("Win32_TokenPrivileges")); 
 
            hash["内存和页面"]=new DataSet("内存和页面"); 
            dataset=(DataSet)hash["内存和页面"]; 
            dataset.Tables.Add(new DataTable("Win32_LogicalMemoryConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_PageFile")); 
            dataset.Tables.Add(new DataTable("Win32_PageFileElementSetting")); 
            dataset.Tables.Add(new DataTable("Win32_PageFileSetting")); 
            dataset.Tables.Add(new DataTable("Win32_PageFileUsage")); 
            dataset.Tables.Add(new DataTable("Win32_SystemLogicalMemoryConfiguration")); 
 
            hash["媒体和音频"]=new DataSet("媒体和音频"); 
            dataset=(DataSet)hash["媒体和音频"]; 
            dataset.Tables.Add(new DataTable("Win32_CodecFile")); 
 
            hash["网络"]=new DataSet("网络"); 
            dataset=(DataSet)hash["网络"]; 
            dataset.Tables.Add(new DataTable(" Win32_ActiveRoute")); 
            dataset.Tables.Add(new DataTable(" Win32_IP4PersistedRouteTable")); 
            dataset.Tables.Add(new DataTable(" Win32_IP4RouteTable")); 
            dataset.Tables.Add(new DataTable(" Win32_IP4RouteTableEvent")); 
            dataset.Tables.Add(new DataTable(" Win32_NetworkClient")); 
            dataset.Tables.Add(new DataTable(" Win32_NetworkConnection")); 
            dataset.Tables.Add(new DataTable(" Win32_NetworkProtocol")); 
            dataset.Tables.Add(new DataTable(" Win32_NTDomain")); 
            dataset.Tables.Add(new DataTable(" Win32_PingStatus")); 
            dataset.Tables.Add(new DataTable(" Win32_ProtocolBinding")); 
 
            hash["操作系统事件"]=new DataSet("操作系统事件"); 
            dataset=(DataSet)hash["操作系统事件"]; 
            dataset.Tables.Add(new DataTable("Win32_ComputerShutdownEvent")); 
            dataset.Tables.Add(new DataTable("Win32_ComputerSystemEvent")); 
            dataset.Tables.Add(new DataTable("NWin32_DeviceChangeEvent")); 
            dataset.Tables.Add(new DataTable("Win32_ModuleLoadTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ModuleTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ProcessStartTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ProcessStopTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ProcessTrace")); 
            dataset.Tables.Add(new DataTable("Win32_SystemConfigurationChangeEvent")); 
            dataset.Tables.Add(new DataTable("Win32_SystemTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ThreadStartTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ThreadStopTrace")); 
            dataset.Tables.Add(new DataTable("Win32_ThreadTrace")); 
            dataset.Tables.Add(new DataTable("Win32_VolumeChangeEvent")); 
 
            hash["操作系统设置"]=new DataSet("操作系统设置"); 
            dataset=(DataSet)hash["操作系统设置"]; 
            dataset.Tables.Add(new DataTable("Win32_BootConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_ComputerSystem")); 
            dataset.Tables.Add(new DataTable("Win32_ComputerSystemProcessor")); 
            dataset.Tables.Add(new DataTable("Win32_ComputerSystemProduct")); 
            dataset.Tables.Add(new DataTable("Win32_DependentService")); 
            dataset.Tables.Add(new DataTable("Win32_LoadOrderGroup")); 
            dataset.Tables.Add(new DataTable("Win32_LoadOrderGroupServiceDependencies")); 
            dataset.Tables.Add(new DataTable("Win32_LoadOrderGroupServiceMembers")); 
            dataset.Tables.Add(new DataTable("Win32_OperatingSystem")); 
            dataset.Tables.Add(new DataTable("Win32_OperatingSystemQFE")); 
            dataset.Tables.Add(new DataTable("Win32_OSRecoveryConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_QuickFixEngineering")); 
            dataset.Tables.Add(new DataTable("Win32_StartupCommand")); 
            dataset.Tables.Add(new DataTable("Win32_SystemBootConfiguration")); 
            dataset.Tables.Add(new DataTable("Win32_SystemDesktop")); 
            dataset.Tables.Add(new DataTable("Win32_SystemDevices")); 
            dataset.Tables.Add(new DataTable("Win32_SystemLoadOrderGroups")); 
            dataset.Tables.Add(new DataTable("Win32_SystemNetworkConnections")); 
            dataset.Tables.Add(new DataTable("Win32_SystemOperatingSystem")); 
            dataset.Tables.Add(new DataTable("Win32_SystemProcesses")); 
            dataset.Tables.Add(new DataTable("Win32_SystemProgramGroups")); 
            dataset.Tables.Add(new DataTable("Win32_SystemResources")); 
            dataset.Tables.Add(new DataTable("Win32_SystemServices")); 
            dataset.Tables.Add(new DataTable("Win32_SystemSetting")); 
            dataset.Tables.Add(new DataTable("Win32_SystemSystemDriver")); 
            dataset.Tables.Add(new DataTable("Win32_SystemTimeZone")); 
            dataset.Tables.Add(new DataTable("Win32_SystemUsers")); 
 
            hash["进程"]=new DataSet("进程"); 
            dataset=(DataSet)hash["进程"]; 
            dataset.Tables.Add(new DataTable("Win32_Process")); 
            dataset.Tables.Add(new DataTable("Win32_ProcessStartup")); 
            dataset.Tables.Add(new DataTable("Win32_Thread")); 
 
            hash["注册表"]=new DataSet("注册表"); 
            dataset=(DataSet)hash["注册表"]; 
            dataset.Tables.Add(new DataTable("Win32_Registry")); 
 
            hash["计划任务"]=new DataSet("计划任务"); 
            dataset=(DataSet)hash["计划任务"]; 
            dataset.Tables.Add(new DataTable("Win32_CurrentTime")); 
            dataset.Tables.Add(new DataTable("Win32_ScheduledJob")); 
 
            hash["安全"]=new DataSet("安全"); 
            dataset=(DataSet)hash["安全"]; 
            dataset.Tables.Add(new DataTable("NWin32_AccountSID")); 
            dataset.Tables.Add(new DataTable("Win32_ACE")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalFileAccess")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalFileAuditing")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalFileGroup")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalFileOwner")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalFileSecuritySetting")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalShareAccess")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalShareAuditing")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalShareSecuritySetting")); 
            dataset.Tables.Add(new DataTable("NWin32_PrivilegesStatus")); 
            dataset.Tables.Add(new DataTable("NWin32_SecurityDescriptor")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySetting")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingAccess")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingAuditing")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingGroup")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingOfLogicalFile")); 
            dataset.Tables.Add(new DataTable("NodWin32_SecuritySettingOfLogicalShare")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingOfObject")); 
            dataset.Tables.Add(new DataTable("Win32_SecuritySettingOwner")); 
            dataset.Tables.Add(new DataTable("Win32_SID")); 
            dataset.Tables.Add(new DataTable("Win32_Trustee")); 
 
            hash["服务"]=new DataSet("服务"); 
            dataset=(DataSet)hash["服务"]; 
            dataset.Tables.Add(new DataTable("Win32_BaseService")); 
            dataset.Tables.Add(new DataTable("Win32_Service")); 
 
            hash["共享"]=new DataSet("共享"); 
            dataset=(DataSet)hash["共享"]; 
            dataset.Tables.Add(new DataTable("Win32_ServerConnection")); 
            dataset.Tables.Add(new DataTable("Win32_ServerSession")); 
            dataset.Tables.Add(new DataTable("Win32_ConnectionShare")); 
            dataset.Tables.Add(new DataTable("Win32_PrinterShare")); 
            dataset.Tables.Add(new DataTable("Win32_SessionConnection")); 
            dataset.Tables.Add(new DataTable("Win32_SessionProcess")); 
            dataset.Tables.Add(new DataTable("Win32_ShareToDirectory")); 
            dataset.Tables.Add(new DataTable("Win32_Share")); 
 
            hash["开始菜单"]=new DataSet("开始菜单"); 
            dataset=(DataSet)hash["开始菜单"]; 
            dataset.Tables.Add(new DataTable("NoWin32_LogicalProgramGroup")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalProgramGroupDirectory")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalProgramGroupItem")); 
            dataset.Tables.Add(new DataTable("Win32_LogicalProgramGroupItemDataFile")); 
            dataset.Tables.Add(new DataTable("Win32_ProgramGroup")); 
            dataset.Tables.Add(new DataTable("Win32_ProgramGroupContents")); 
            dataset.Tables.Add(new DataTable("Win32_ProgramGroupOrItem")); 
 
            hash["用户"]=new DataSet("用户"); 
            dataset=(DataSet)hash["用户"]; 
            dataset.Tables.Add(new DataTable("Win32_Account")); 
            dataset.Tables.Add(new DataTable("Win32_Group")); 
            dataset.Tables.Add(new DataTable("Win32_GroupInDomain")); 
            dataset.Tables.Add(new DataTable("Win32_GroupUser")); 
            dataset.Tables.Add(new DataTable("Win32_LogonSession")); 
            dataset.Tables.Add(new DataTable("Win32_LogonSessionMappedDisk")); 
            dataset.Tables.Add(new DataTable("Win32_NetworkLoginProfile")); 
            dataset.Tables.Add(new DataTable("Win32_SystemAccount")); 
            dataset.Tables.Add(new DataTable("Win32_UserAccount")); 
            dataset.Tables.Add(new DataTable("Win32_UserInDomain")); 
 
            hash["Windows事件日志"]=new DataSet("Windows事件日志"); 
            dataset=(DataSet)hash["Windows事件日志"]; 
            dataset.Tables.Add(new DataTable("Win32_NTEventlogFile")); 
            dataset.Tables.Add(new DataTable("Win32_NTLogEvent")); 
            dataset.Tables.Add(new DataTable("Win32_NTLogEventComputer")); 
            dataset.Tables.Add(new DataTable("Win32_NTLogEventLog")); 
            dataset.Tables.Add(new DataTable("Win32_NTLogEventUser")); 
 
            hash["Windows产品激活"]=new DataSet("Windows产品激活"); 
            dataset=(DataSet)hash["Windows产品激活"]; 
            dataset.Tables.Add(new DataTable("Win32_ComputerSystemWindowsProductActivationSetting")); 
            dataset.Tables.Add(new DataTable("Win32_Proxy")); 
            dataset.Tables.Add(new DataTable("Win32_WindowsProductActivation")); 
 
            hash["应用程序安装"]=new DataSet("应用程序安装"); 
            dataset=(DataSet)hash["应用程序安装"]; 
            dataset.Tables.Add(new DataTable("Win32_ActionCheck")); 
            dataset.Tables.Add(new DataTable("Win32_ApplicationCommandLine")); 
            dataset.Tables.Add(new DataTable("Win32_ApplicationService")); 
            dataset.Tables.Add(new DataTable("Win32_Binary")); 
            dataset.Tables.Add(new DataTable("Win32_BindImageAction")); 
            dataset.Tables.Add(new DataTable("Win32_CheckCheck")); 
            dataset.Tables.Add(new DataTable("Win32_ClassInfoAction")); 
            dataset.Tables.Add(new DataTable("Win32_CommandLineAccess")); 
            dataset.Tables.Add(new DataTable("Win32_Condition")); 
            dataset.Tables.Add(new DataTable("Win32_CreateFolderAction")); 
            dataset.Tables.Add(new DataTable("Win32_DuplicateFileAction")); 
            dataset.Tables.Add(new DataTable("Win32_EnvironmentSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_ExtensionInfoAction")); 
            dataset.Tables.Add(new DataTable("Win32_FileSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_FontInfoAction")); 
            dataset.Tables.Add(new DataTable("Win32_IniFileSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_InstalledSoftwareElement")); 
            dataset.Tables.Add(new DataTable("Win32_LaunchCondition")); 
            dataset.Tables.Add(new DataTable("Win32_ManagedSystemElementResource")); 
            dataset.Tables.Add(new DataTable("Win32_MIMEInfoAction")); 
            dataset.Tables.Add(new DataTable("Win32_MoveFileAction")); 
            dataset.Tables.Add(new DataTable("Win32_MSIResource")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCAttribute")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCDataSourceAttribute")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCDataSourceSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCDriverAttribute")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCDriverSoftwareElement")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCDriverSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCSourceAttribute")); 
            dataset.Tables.Add(new DataTable("Win32_ODBCTranslatorSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_Patch")); 
            dataset.Tables.Add(new DataTable("Win32_PatchFile")); 
            dataset.Tables.Add(new DataTable("Win32_PatchPackage")); 
            dataset.Tables.Add(new DataTable("Win32_Product")); 
            dataset.Tables.Add(new DataTable("Win32_ProductCheck")); 
            dataset.Tables.Add(new DataTable("Win32_ProductResource")); 
            dataset.Tables.Add(new DataTable("Win32_ProductSoftwareFeatures")); 
            dataset.Tables.Add(new DataTable("Win32_ProgIDSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_Property")); 
            dataset.Tables.Add(new DataTable("Win32_PublishComponentAction")); 
            dataset.Tables.Add(new DataTable("Win32_RegistryAction")); 
            dataset.Tables.Add(new DataTable("Win32_RemoveFileAction")); 
            dataset.Tables.Add(new DataTable("Win32_RemoveIniAction")); 
            dataset.Tables.Add(new DataTable("Win32_ReserveCost")); 
            dataset.Tables.Add(new DataTable("Win32_SelfRegModuleAction")); 
            dataset.Tables.Add(new DataTable("Win32_ServiceControl")); 
            dataset.Tables.Add(new DataTable("Win32_ServiceSpecification")); 
            dataset.Tables.Add(new DataTable("Win32_ServiceSpecificationService")); 
            dataset.Tables.Add(new DataTable("Win32_SettingCheck")); 
            dataset.Tables.Add(new DataTable("Win32_ShortcutAction")); 
            dataset.Tables.Add(new DataTable("Win32_ShortcutSAP")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareElement")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareElementAction")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareElementCheck")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareElementCondition")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareElementResource")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareFeature")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareFeatureAction")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareFeatureCheck")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareFeatureParent")); 
            dataset.Tables.Add(new DataTable("Win32_SoftwareFeatureSoftwareElements")); 
            dataset.Tables.Add(new DataTable("Win32_TypeLibraryAction")); 
 
 
            _ClassHash["WMI服务管理"]=new Hashtable(); 
            hash=(Hashtable)_ClassHash["WMI服务管理"]; 
 
            hash["WMI设置"]=new DataSet("WMI设置"); 
            dataset=(DataSet)hash["WMI设置"]; 
            dataset.Tables.Add(new DataTable("Win32_MethodParameterClass")); 
 
            hash["WMI管理"]=new DataSet("WMI管理"); 
            dataset=(DataSet)hash["WMI管理"]; 
            dataset.Tables.Add(new DataTable("Win32_WMISetting")); 
            dataset.Tables.Add(new DataTable("Win32_WMIElementSetting")); 
 
 
            _ClassHash["性能计数器"]=new Hashtable(); 
            hash=(Hashtable)_ClassHash["性能计数器"]; 
 
            hash["格式化性能计数"]=new DataSet("格式化性能计数"); 
            dataset=(DataSet)hash["格式化性能计数"]; 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_ASP_ActiveServerPages")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_ContentFilter_IndexingServiceFilter")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_ContentIndex_IndexingService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_InetInfo_InternetInformationServicesGlobal")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_ISAPISearch_HttpIndexingService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_NTFSDRV_SMTPNTFSStoreDriver")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfDisk_LogicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfDisk_PhysicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfNet_Browser")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfNet_Redirector")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfNet_Server")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfNet_ServerWorkQueues")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_Cache")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_Memory")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_Objects")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_PagingFile")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_Processor")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfOS_System")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_FullImage_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_Image_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_JobObject")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_JobObjectDetails")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_Process")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_ProcessAddressSpace_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_Thread")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PerfProc_ThreadDetails_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PSched_PSchedFlow")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_PSched_PSchedPipe")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_RemoteAccess_RASPort")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_RemoteAccess_RASTotal")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_RSVP_ACSRSVPInterfaces")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_RSVP_ACSRSVPService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_SMTPSVC_SMTPServer")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Spooler_PrintQueue")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_TapiSrv_Telephony")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_ICMP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_IP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_NBTConnection")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_NetworkInterface")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_TCP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_Tcpip_UDP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_TermService_TerminalServices")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_TermService_TerminalServicesSession")); 
            dataset.Tables.Add(new DataTable("Win32_PerfFormattedData_W3SVC_WebService")); 
 
            hash["原始性能计数"]=new DataSet("原始性能计数"); 
            dataset=(DataSet)hash["原始性能计数"]; 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_ASP_ActiveServerPages")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_ContentFilter_IndexingServiceFilter")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_ContentIndex_IndexingService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_InetInfo_InternetInformationServicesGlobal")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_ISAPISearch_HttpIndexingService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_NTFSDRV_SMTPNTFSStoreDriver")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfDisk_LogicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfDisk_PhysicalDisk")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfNet_Browser")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfNet_Redirector")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfNet_Server")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfNet_ServerWorkQueues")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_Cache")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_Memory")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_Objects")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_PagingFile")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_Processor")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfOS_System")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_FullImage_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_Image_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_JobObject")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_JobObjectDetails")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_Process")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_ProcessAddressSpace_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_Thread")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PerfProc_ThreadDetails_Costly")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_PSched_PSchedFlow")); 
            dataset.Tables.Add(new DataTable("NWin32_PerfRawData_PSched_PSchedPipe")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_RemoteAccess_RASPort")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_RemoteAccess_RASTotal")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_RSVP_ACSRSVPInterfaces")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_RSVP_ACSRSVPService")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_SMTPSVC_SMTPServer")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Spooler_PrintQueue")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_TapiSrv_Telephony")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_ICMP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_IP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_NBTConnection")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_NetworkInterface")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_TCP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_Tcpip_UDP")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_TermService_TerminalServices")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_TermService_TerminalServicesSession")); 
            dataset.Tables.Add(new DataTable("Win32_PerfRawData_W3SVC_WebService")); 
 
        } 
        public Hashtable ClassHash 
        { 
            get{return _ClassHash;} 
        } 
    } 
分享到:
评论

相关推荐

    wmi.rar_WMI C++_WMI封装_visual c_wmi_wmi 类

    标题中的“wmi.rar_WMI C++_WMI封装_visual c_wmi_wmi 类”揭示了这个压缩包内容的核心,它包含了使用C++编程语言对Windows Management Instrumentation(WMI)进行封装的相关代码和示例。WMI是微软提供的一种用于...

    VC WMI 类可以查看共享文件夹的绝对路径

    为了进一步封装,你可能在`WMI.h`文件中定义一个类,比如`WMIShareInfo`,来包装这些操作,并提供友好的API供其他部分的代码使用。这个类可能会包含如`GetSharePath`这样的成员函数,用于获取特定共享的路径。 总之...

    WMI信息Class代码生成器WMIclass[WMIclass.rar]-精品源代码

    WMIclass是一款用于简化WMI查询并自动生成对应类代码的工具,它可以极大地提高开发人员的工作效率,减少手动编写WMI查询代码的时间。 **源代码解析** 该压缩包包含以下几个文件: 1. **使用说明.txt**:这个文件...

    C#操作WMI完美demo

    通过Win32_OperatingSystem和Win32_PhysicalMemory类,可以获取系统总内存、可用内存等信息。 ```csharp ManagementObjectSearcher osSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_...

    dotnet-仅用于MicrosoftWindows的WMI的命令shell封装

    标题中的“dotnet-仅用于MicrosoftWindows的WMI的命令shell封装”指的是一个.NET开发的CLI(命令行接口)工具,专门用于与Windows Management Instrumentation(WMI)进行交互。WMI是Microsoft Windows操作系统中一...

    c++封装好的IP的获取和修改源码,通过NetworkCfg和wmi方式,支持Windows和WinCE系统,使用简单

    然而,`NetworkCfg`并不适用于所有环境,特别是较老的或嵌入式系统,如WinCE。 这时,`WMI`发挥作用。`WMI`是Windows系统中的一个核心组件,它提供了对系统硬件、软件和服务状态的全面管理信息。通过WQL(Windows ...

    用WMI获取操作系统补丁信息

    3. **执行WQL查询**:定义一个WQL(WMI查询语言)查询语句,如“SELECT * FROM Win32_QuickFixEngineering”,这将返回所有已安装的hotfix信息。 4. **执行查询并获取结果**:使用IWbemServices对象的ExecQuery方法...

    c#使用WMI更改IP地址

    2. **查询WMI类**: 使用`ManagementObjectSearcher`查询WMI类`Win32_NetworkAdapterConfiguration`,这个类包含了网络适配器的配置信息,包括IP地址。 ```csharp string query = "SELECT * FROM Win32_...

    C#串口通讯封装类+串口实时监控实例

    "串口通讯封装类.cs"和"串口设备通讯类.cs"是两个关键的源代码文件,它们实现了对串口操作的抽象和封装,以简化开发者的工作。这些类通常包含打开、关闭串口,设置波特率、数据位、停止位、校验位等参数,以及发送和...

    WMI_Introduction.rar_carbon91i_deerc8x_delphi WMI使用_delphi wmi

    1. **导入WMI库**: Delphi提供了TWMIService和IWbemLocator等类,它们封装了与WMI交互所需的接口。要使用这些类,我们需要在项目中导入`ActiveX`和`WbemScripting`单元。 2. **连接到WMI服务**: 使用IWbemLocator...

    易语言利用WMI查询操作系统

    4. 解析WMI结果:易语言会将WMI查询的结果封装为一个集合,我们可以通过迭代这个集合,获取每个对象的属性值。这些属性值通常是以字符串形式返回,需要根据需求进行转换和处理。 5. 错误处理:在调用WMI接口时,...

    WMI入门教程(微软版)之一

    WMI脚本库的对象模型构建在一系列自动化对象之上,这些对象封装了与WMI交互所需的所有功能。在Windows 2000及后续版本中,该库包含24个自动化对象,而早期版本则有19个。这些对象被设计成高度模块化和可扩展的,使得...

    基于WMI的客户端信息采集工具

    它的组件化开发模式使得快速构建GUI界面变得简单,同时提供了丰富的类库,包括对WMI的封装,使得能够轻松地通过代码访问WMI接口。 【压缩包子文件的文件名称列表】中只给出了"cmc_v2.5",这很可能是客户端信息采集...

    这个代码可以获取您的计算机的有关硬件设备信息以及软件信息,没有使用API,基于.NET Framework 2.0,使用了编写的WMI类文件

    WMI类文件通常包含了封装好的WMI查询和操作逻辑,使得程序员能够更方便地调用和处理系统信息。在这个代码中,开发者可能已经创建了一个自定义的VB.NET类,该类包装了对WMI服务的调用,从而简化了获取硬件和软件信息...

    自动获取电脑硬件CPU、网卡、硬盘、主板16位序列号

    主板的序列号通常关联于BIOS,可以通过WMI的Win32_BIOS类获取: ```powershell Get-WmiObject -Class Win32_BIOS | Select-Object SerialNumber ``` 以上脚本示例都可以在命令行环境中执行,或者集成到自动化脚本...

    易语言应用WMI监控进程源码.7z

    3. **WMI查询**:使用易语言访问WMI通常涉及到创建WMI连接、指定命名空间、执行WMI查询语句(如`SELECT * FROM Win32_Process`用于获取所有进程信息)。这些操作都需要对WMI的类和方法有深入理解。 4. **进程管理**...

    WMI 编程练习(C#版)

    使用ManagementObjectSearcher类来执行WMI查询,返回一个ManagementObjectCollection对象,其中包含所有匹配的结果。 ```csharp string query = "SELECT * FROM Win32_Processor"; ManagementObjectSearcher ...

    WMI_Test.zip

    `AcWMI.cpp`和`AcWMI.h`可能是自定义的WMI访问类,封装了与WMI服务的交互,使得代码更易于管理和维护。`WMI_Test.dsp`和`WMI_Test.dsw`是旧版的Visual Studio项目文件,用于构建和管理整个工程。`WMI_Test.h`则包含...

    CC++通过WMI和系统API函数获取获取系统硬件配置信息

    例如,`root\cimv2`命名空间包含了大量与系统硬件和软件相关的类,而`root\directory\ldap`则用于处理Active Directory对象。 #### 4. API函数封装示例 文章中给出了一段基于API方式实现的代码片段,展示了如何...

    X9315WMI-2.7的技术参数

    产品型号:X9315WMI-2.7工作电压(V):2.7~5.5总阻值(kΩ):10端电压(V):0~5抽头数:32接口方式:CS,U/D,INC电阻增加方式:线性工作电流(mA):0.050封装/温度(℃):8-MSOP/-40~85描述:低功耗,低噪声,单DCP,抽头位置掉电自动...

Global site tag (gtag.js) - Google Analytics