获取windows 操作系统下的硬件或操作系统信息等
奇怪的工作,制作的是一款办公应用软件,领导却要求我统计用户计算机的物理信息,什么CPU的型号、核心数,什么内存信息等各种乱七八糟的用户信息。我想问,现在用户的信息就这么没有隐私性了么?想获取就获取传递到后台……无奈我只是民工,还是老老实实做了。然后查阅了一些资料,主要用到了System.Management命名空间下的信息(System.Management 命名空间 | Microsoft Docs)。
1、引用
在查询计算机硬件或者操作系统的信息时,使用ManagementObjectSearcher类或者ManagementClass类,其在在System.Management
命名空间下,需要添加对System.Management
的引用。
在日常的编程中,我们可以通过Environment获得一些简单的系统信息,如获得操作系统登录用户名:Environment.UserName。 但更多、复杂的信息并不能获得。
2、用法
下面两部分代码分别演示获取操作系统信息:
1、使用ManagementObjectSearcher类
- ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");//注意查询的类型 from *
- ManagementObjectSearcher searcher =new ManagementObjectSearcher(query);//也可以直接将查询字符串写入这个构造函数中
- ManagementObjectCollection queryCollection = searcher.Get();
- foreach (ManagementObject m in queryCollection)
- {
- Console.WriteLine("Computer Name : {0}", m["csname"]);
- Console.WriteLine("Windows Directory : {0}", m["WindowsDirectory"]);
- Console.WriteLine("Operating System: {0}", m["Caption"]);
- Console.WriteLine("Version: {0}", m["Version"]);
- Console.WriteLine("Manufacturer : {0}", m["Manufacturer"]);
- }
2、使用ManagementClass类
- ManagementClass mc = new ManagementClass("Win32_OperatingSystem");//填入需要查询的类型
- ManagementObjectCollection queryCollection = mc.GetInstances();
- foreach (ManagementObject m in queryCollection)
- {
- Console.WriteLine("Computer Name : {0}", m["csname"]);
- Console.WriteLine("Windows Directory : {0}", m["WindowsDirectory"]);
- Console.WriteLine("Operating System: {0}", m["Caption"]);
- Console.WriteLine("Version: {0}", m["Version"]);
- Console.WriteLine("Manufacturer : {0}", m["Manufacturer"]);
- }
如果不知道要获取的属性名称,可以循环遍历打印出来(注意获取值的方式有两种)。
- ManagementClass mc = new ManagementClass("Win32_OperatingSystem");//填入需要查询的类型
- ManagementObjectCollection moc = mc.GetInstances();
- foreach (ManagementObject mo in moc)
- {
- foreach (PropertyData pd in mo.Properties)
- {
- if (mo[pd.Name] != null && mo[pd.Name].ToString() != "")
- {
- Console.WriteLine(string.Format("{0}:{1}", pd.Name, mo.GetPropertyValue(pd.Name)));
- }
- }
- }
3、示例
以生成注册码为例,注册码使用CPU的序列号和C盘的序列号为基准:
- /// <summary>
- /// 获取CPU序列号
- /// </summary>
- /// <returns></returns>
- private string GetCpuNum()
- {
- ManagementClass mc = new ManagementClass("Win32_Processor");//填入需要查询的类型
- ManagementObjectCollection queryCollection = mc.GetInstances();
- foreach (ManagementObject m in queryCollection)
- {
- return m.GetPropertyValue("Processorid").ToString();
- }
- return string.Empty;
- }
- /// <summary>
- /// 取得设备硬盘的卷标号
- /// </summary>
- /// <returns></returns>
- private Dictionary<string,string> GetDiskVolumeSerialNumber()
- {
- Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
- ManagementClass mc = new ManagementClass("Win32_LogicalDisk");//填入需要查询的类型
- ManagementObjectCollection queryCollection = mc.GetInstances();
- foreach (ManagementObject mo in queryCollection)
- {
- keyValuePairs.Add(mo.GetPropertyValue("DeviceID").ToString().Trim(':'), mo.GetPropertyValue("VolumeSerialNumber").ToString());
- }
- return keyValuePairs;
- }
- ///<summary>
- ///生成注册码
- ///</summary>
- ///<returns></returns>
- public string GetRegCode()
- {
- int[] intCode = new int[127];//存储密钥
- int[] intNumber = new int[25];//存机器码的Ascii值
- char[] Charcode = new char[25];//存储机器码字
- //初始化127位数组
- for (int i = 1; i < intCode.Length; i++)
- {
- intCode[i] = i % 9;
- }
- string cpuNum = GetCpuNum();
- string diskSerialNumber = GetDiskVolumeSerialNumber()["C"];
- string strNum = cpuNum + diskSerialNumber;//生成机器码
- string MNum = strNum.Substring(0, 24);//从生成的字符串中取出前24个字符做为机器码
- for (int i = 1; i < Charcode.Length; i++)//把机器码存入数组中
- {
- Charcode[i] = Convert.ToChar(MNum.Substring(i - 1, 1));
- }
- for (int j = 1; j < intNumber.Length; j++)//把字符的ASCII值存入一个整数组中。
- {
- intNumber[j] = intCode[Convert.ToInt32(Charcode[j])] + Convert.ToInt32(Charcode[j]);
- }
- string strAsciiName = "";//用于存储注册码
- for (int j = 1; j < intNumber.Length; j++)
- {
- if (intNumber[j] >= 48 && intNumber[j] <= 57)//判断字符ASCII值是否0-9之间
- {
- strAsciiName += Convert.ToChar(intNumber[j]).ToString();
- }
- else if (intNumber[j] >= 65 && intNumber[j] <= 90)//判断字符ASCII值是否A-Z之间
- {
- strAsciiName += Convert.ToChar(intNumber[j]).ToString();
- }
- else if (intNumber[j] >= 97 && intNumber[j] <= 122)//判断字符ASCII值是否a-z之间
- {
- strAsciiName += Convert.ToChar(intNumber[j]).ToString();
- }
- else//判断字符ASCII值不在以上范围内
- {
- if (intNumber[j] > 122)//判断字符ASCII值是否大于z
- {
- strAsciiName += Convert.ToChar(intNumber[j] - 10).ToString();
- }
- else
- {
- strAsciiName += Convert.ToChar(intNumber[j] - 9).ToString();
- }
- }
- }
- return strAsciiName;//返回注册码
- }
4、常用的Key
ObjectQuery和ManagementClass都需要输入Key值,以明确需要获取什么类型的数据。其常用的Key值如下:
- internal enum WmiType
- {
- Win32_Processor, // CPU 处理器
- Win32_PhysicalMemory, // 物理内存条
- Win32_Keyboard, // 键盘
- Win32_PointingDevice, // 点输入设备,包括鼠标。
- Win32_FloppyDrive, // 软盘驱动器
- Win32_DiskDrive, // 硬盘驱动器
- Win32_CDROMDrive, // 光盘驱动器
- Win32_BaseBoard, // 主板
- Win32_BIOS, // BIOS 芯片
- Win32_ParallelPort, // 并口
- Win32_SerialPort, // 串口
- Win32_SerialPortConfiguration, // 串口配置
- Win32_SoundDevice, // 多媒体设置,一般指声卡。
- Win32_SystemSlot, // 主板插槽 (ISA & PCI & AGP)
- Win32_USBController, // USB 控制器
- Win32_NetworkAdapter, // 网络适配器
- Win32_NetworkAdapterConfiguration, // 网络适配器设置
- Win32_Printer, // 打印机
- Win32_PrinterConfiguration, // 打印机设置
- Win32_PrintJob, // 打印机任务
- Win32_TCPIPPrinterPort, // 打印机端口
- Win32_POTSModem, // MODEM
- Win32_POTSModemToSerialPort, // MODEM 端口
- Win32_DesktopMonitor, // 显示器
- Win32_DisplayConfiguration, // 显卡
- Win32_DisplayControllerConfiguration, // 显卡设置
- Win32_VideoController, // 显卡细节。
- Win32_VideoSettings, // 显卡支持的显示模式。
- // 操作系统
- Win32_TimeZone, // 时区
- Win32_SystemDriver, // 驱动程序
- Win32_DiskPartition, // 磁盘分区
- Win32_LogicalDisk, // 逻辑磁盘
- Win32_LogicalDiskToPartition, // 逻辑磁盘所在分区及始末位置。
- Win32_LogicalMemoryConfiguration, // 逻辑内存配置
- Win32_PageFile, // 系统页文件信息
- Win32_PageFileSetting, // 页文件设置
- Win32_BootConfiguration, // 系统启动配置
- Win32_ComputerSystem, // 计算机信息简要
- Win32_OperatingSystem, // 操作系统信息
- Win32_StartupCommand, // 系统自动启动程序
- Win32_Service, // 系统安装的服务
- Win32_Group, // 系统管理组
- Win32_GroupUser, // 系统组帐号
- Win32_UserAccount, // 用户帐号
- Win32_Process, // 系统进程
- Win32_Thread, // 系统线程
- Win32_Share, // 共享
- Win32_NetworkClient, // 已安装的网络客户端
- Win32_NetworkProtocol, // 已安装的网络协议
- }
5、全部Key值


- internal enum WmiType
- {
- Win32_1394Controller,
- Win32_1394ControllerDevice,
- Win32_Account,
- Win32_AccountSID,
- Win32_ACE,
- Win32_ActionCheck,
- Win32_AllocatedResource,
- Win32_ApplicationCommandLine,
- Win32_ApplicationService,
- Win32_AssociatedBattery,
- Win32_AssociatedProcessorMemory,
- Win32_BaseBoard,
- Win32_BaseService,
- Win32_Battery,
- Win32_Binary,
- Win32_BindImageAction,
- Win32_BIOS,
- Win32_BootConfiguration,
- Win32_Bus,
- Win32_CacheMemory,
- Win32_CDROMDrive,
- Win32_CheckCheck,
- Win32_CIMLogicalDeviceCIMDataFile,
- Win32_ClassicCOMApplicationClasses,
- Win32_ClassicCOMClass,
- Win32_ClassicCOMClassSetting,
- Win32_ClassicCOMClassSettings,
- Win32_ClassInfoAction,
- Win32_ClientApplicationSetting,
- Win32_CodecFile,
- Win32_COMApplication,
- Win32_COMApplicationClasses,
- Win32_COMApplicationSettings,
- Win32_COMClass,
- Win32_ComClassAutoEmulator,
- Win32_ComClassEmulator,
- Win32_CommandLineAccess,
- Win32_ComponentCategory,
- Win32_ComputerSystem,
- Win32_ComputerSystemProcessor,
- Win32_ComputerSystemProduct,
- Win32_COMSetting,
- Win32_Condition,
- Win32_CreateFolderAction,
- Win32_CurrentProbe,
- Win32_DCOMApplication,
- Win32_DCOMApplicationAccessAllowedSetting,
- Win32_DCOMApplicationLaunchAllowedSetting,
- Win32_DCOMApplicationSetting,
- Win32_DependentService,
- Win32_Desktop,
- Win32_DesktopMonitor,
- Win32_DeviceBus,
- Win32_DeviceMemoryAddress,
- Win32_DeviceSettings,
- Win32_Directory,
- Win32_DirectorySpecification,
- Win32_DiskDrive,
- Win32_DiskDriveToDiskPartition,
- Win32_DiskPartition,
- Win32_DisplayConfiguration,
- Win32_DisplayControllerConfiguration,
- Win32_DMAChannel,
- Win32_DriverVXD,
- Win32_DuplicateFileAction,
- Win32_Environment,
- Win32_EnvironmentSpecification,
- Win32_ExtensionInfoAction,
- Win32_Fan,
- Win32_FileSpecification,
- Win32_FloppyController,
- Win32_FloppyDrive,
- Win32_FontInfoAction,
- Win32_Group,
- Win32_GroupUser,
- Win32_HeatPipe,
- Win32_IDEController,
- Win32_IDEControllerDevice,
- Win32_ImplementedCategory,
- Win32_InfraredDevice,
- Win32_IniFileSpecification,
- Win32_InstalledSoftwareElement,
- Win32_IRQResource,
- Win32_Keyboard,
- Win32_LaunchCondition,
- Win32_LoadOrderGroup,
- Win32_LoadOrderGroupServiceDependencies,
- Win32_LoadOrderGroupServiceMembers,
- Win32_LogicalDisk,
- Win32_LogicalDiskRootDirectory,
- Win32_LogicalDiskToPartition,
- Win32_LogicalFileAccess,
- Win32_LogicalFileAuditing,
- Win32_LogicalFileGroup,
- Win32_LogicalFileOwner,
- Win32_LogicalFileSecuritySetting,
- Win32_LogicalMemoryConfiguration,
- Win32_LogicalProgramGroup,
- Win32_LogicalProgramGroupDirectory,
- Win32_LogicalProgramGroupItem,
- Win32_LogicalProgramGroupItemDataFile,
- Win32_LogicalShareAccess,
- Win32_LogicalShareAuditing,
- Win32_LogicalShareSecuritySetting,
- Win32_ManagedSystemElementResource,
- Win32_MemoryArray,
- Win32_MemoryArrayLocation,
- Win32_MemoryDevice,
- Win32_MemoryDeviceArray,
- Win32_MemoryDeviceLocation,
- Win32_MethodParameterClass,
- Win32_MIMEInfoAction,
- Win32_MotherboardDevice,
- Win32_MoveFileAction,
- Win32_MSIResource,
- Win32_NetworkAdapter,
- Win32_NetworkAdapterConfiguration,
- Win32_networkAdapterSetting,
- Win32_NetworkClient,
- Win32_networkConnection,
- Win32_NetworkLoginProfile,
- Win32_NetworkProtocol,
- Win32_NTEventlogFile,
- Win32_NTLogEvent,
- Win32_NTLogEventComputer,
- Win32_NTLogEventLog,
- Win32_NTLogEventUser,
- Win32_ODBCAttribute,
- Win32_ODBCDataSourceAttribute,
- Win32_ODBCDataSourceSpecification,
- Win32_ODBCDriverAttribute,
- Win32_ODBCDriverSoftwareElement,
- Win32_ODBCDriverSpecification,
- Win32_ODBCSourceAttribute,
- Win32_ODBCTranslatorSpecification,
- Win32_OnBoardDevice,
- Win32_OperatingSystem,
- Win32_OperatingSystemQFE,
- Win32_OSRecoveryConfiguration,
- Win32_PageFile,
- Win32_PageFileElementSetting,
- Win32_PageFileSetting,
- Win32_PageFileUsage,
- Win32_ParallelPort,
- Win32_Patch,
- Win32_PatchFile,
- Win32_PatchPackage,
- Win32_PCMCIAController,
- Win32_Perf,
- Win32_PerfRawData,
- Win32_PerfRawData_ASP_ActiveServerPages,
- Win32_PerfRawData_ASPnet_114322_ASPnetAppsv114322,
- Win32_PerfRawData_ASPnet_114322_ASPnetv114322,
- Win32_PerfRawData_ASPnet_ASPnet,
- Win32_PerfRawData_ASPnet_ASPnetApplications,
- Win32_PerfRawData_IAS_IASAccountingClients,
- Win32_PerfRawData_IAS_IASAccountingServer,
- Win32_PerfRawData_IAS_IASAuthenticationClients,
- Win32_PerfRawData_IAS_IASAuthenticationServer,
- Win32_PerfRawData_InetInfo_InternetInformationServicesGlobal,
- Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator,
- Win32_PerfRawData_MSFTPSVC_FTPService,
- Win32_PerfRawData_MSSQLSERVER_SQLServerAccessMethods,
- Win32_PerfRawData_MSSQLSERVER_SQLServerBackupDevice,
- Win32_PerfRawData_MSSQLSERVER_SQLServerBufferManager,
- Win32_PerfRawData_MSSQLSERVER_SQLServerBufferPartition,
- Win32_PerfRawData_MSSQLSERVER_SQLServerCacheManager,
- Win32_PerfRawData_MSSQLSERVER_SQLServerDatabases,
- Win32_PerfRawData_MSSQLSERVER_SQLServerGeneralStatistics,
- Win32_PerfRawData_MSSQLSERVER_SQLServerLatches,
- Win32_PerfRawData_MSSQLSERVER_SQLServerLocks,
- Win32_PerfRawData_MSSQLSERVER_SQLServerMemoryManager,
- Win32_PerfRawData_MSSQLSERVER_SQLServerReplicationAgents,
- Win32_PerfRawData_MSSQLSERVER_SQLServerReplicationDist,
- Win32_PerfRawData_MSSQLSERVER_SQLServerReplicationLogreader,
- Win32_PerfRawData_MSSQLSERVER_SQLServerReplicationMerge,
- Win32_PerfRawData_MSSQLSERVER_SQLServerReplicationSnapshot,
- Win32_PerfRawData_MSSQLSERVER_SQLServerSQLStatistics,
- Win32_PerfRawData_MSSQLSERVER_SQLServerUserSettable,
- Win32_PerfRawData_netFramework_netCLRExceptions,
- Win32_PerfRawData_netFramework_netCLRInterop,
- Win32_PerfRawData_netFramework_netCLRJit,
- Win32_PerfRawData_netFramework_netCLRLoading,
- Win32_PerfRawData_netFramework_netCLRLocksAndThreads,
- Win32_PerfRawData_netFramework_netCLRMemory,
- Win32_PerfRawData_netFramework_netCLRRemoting,
- Win32_PerfRawData_netFramework_netCLRSecurity,
- Win32_PerfRawData_Outlook_Outlook,
- Win32_PerfRawData_PerfDisk_PhysicalDisk,
- Win32_PerfRawData_Perfnet_Browser,
- Win32_PerfRawData_Perfnet_Redirector,
- Win32_PerfRawData_Perfnet_Server,
- Win32_PerfRawData_Perfnet_ServerWorkQueues,
- Win32_PerfRawData_PerfOS_Cache,
- Win32_PerfRawData_PerfOS_Memory,
- Win32_PerfRawData_PerfOS_Objects,
- Win32_PerfRawData_PerfOS_PagingFile,
- Win32_PerfRawData_PerfOS_Processor,
- Win32_PerfRawData_PerfOS_System,
- Win32_PerfRawData_PerfProc_FullImage_Costly,
- Win32_PerfRawData_PerfProc_Image_Costly,
- Win32_PerfRawData_PerfProc_JobObject,
- Win32_PerfRawData_PerfProc_JobObjectDetails,
- Win32_PerfRawData_PerfProc_Process,
- Win32_PerfRawData_PerfProc_ProcessAddressSpace_Costly,
- Win32_PerfRawData_PerfProc_Thread,
- Win32_PerfRawData_PerfProc_ThreadDetails_Costly,
- Win32_PerfRawData_RemoteAccess_RASPort,
- Win32_PerfRawData_RemoteAccess_RASTotal,
- Win32_PerfRawData_RSVP_ACSPerRSVPService,
- Win32_PerfRawData_Spooler_PrintQueue,
- Win32_PerfRawData_TapiSrv_Telephony,
- Win32_PerfRawData_Tcpip_ICMP,
- Win32_PerfRawData_Tcpip_IP,
- Win32_PerfRawData_Tcpip_NBTConnection,
- Win32_PerfRawData_Tcpip_networkInterface,
- Win32_PerfRawData_Tcpip_TCP,
- Win32_PerfRawData_Tcpip_UDP,
- Win32_PerfRawData_W3SVC_WebService,
- Win32_PhysicalMedia,
- Win32_PhysicalMemory,
- Win32_PhysicalMemoryArray,
- Win32_PhysicalMemoryLocation,
- Win32_PNPAllocatedResource,
- Win32_PnPDevice,
- Win32_PnPEntity,
- Win32_PointingDevice,
- Win32_PortableBattery,
- Win32_PortConnector,
- Win32_PortResource,
- Win32_POTSModem,
- Win32_POTSModemToSerialPort,
- Win32_PowerManagementEvent,
- Win32_Printer,
- Win32_PrinterConfiguration,
- Win32_PrinterController,
- Win32_PrinterDriverDll,
- Win32_PrinterSetting,
- Win32_PrinterShare,
- Win32_PrintJob,
- Win32_PrivilegesStatus,
- Win32_Process,
- Win32_Processor,
- Win32_ProcessStartup,
- Win32_Product,
- Win32_ProductCheck,
- Win32_ProductResource,
- Win32_ProductSoftwareFeatures,
- Win32_ProgIDSpecification,
- Win32_ProgramGroup,
- Win32_ProgramGroupContents,
- Win32_ProgramGroupOrItem,
- Win32_Property,
- Win32_ProtocolBinding,
- Win32_PublishComponentAction,
- Win32_QuickFixEngineering,
- Win32_Refrigeration,
- Win32_Registry,
- Win32_RegistryAction,
- Win32_RemoveFileAction,
- Win32_RemoveIniAction,
- Win32_ReserveCost,
- Win32_ScheduledJob,
- Win32_SCSIController,
- Win32_SCSIControllerDevice,
- Win32_SecurityDescriptor,
- Win32_SecuritySetting,
- Win32_SecuritySettingAccess,
- Win32_SecuritySettingAuditing,
- Win32_SecuritySettingGroup,
- Win32_SecuritySettingOfLogicalFile,
- Win32_SecuritySettingOfLogicalShare,
- Win32_SecuritySettingOfObject,
- Win32_SecuritySettingOwner,
- Win32_SelfRegModuleAction,
- Win32_SerialPort,
- Win32_SerialPortConfiguration,
- Win32_SerialPortSetting,
- Win32_Service,
- Win32_ServiceControl,
- Win32_ServiceSpecification,
- Win32_ServiceSpecificationService,
- Win32_SettingCheck,
- Win32_Share,
- Win32_ShareToDirectory,
- Win32_ShortcutAction,
- Win32_ShortcutFile,
- Win32_ShortcutSAP,
- Win32_SID,
- Win32_SMBIOSMemory,
- Win32_SoftwareElement,
- Win32_SoftwareElementAction,
- Win32_SoftwareElementCheck,
- Win32_SoftwareElementCondition,
- Win32_SoftwareElementResource,
- Win32_SoftwareFeature,
- Win32_SoftwareFeatureAction,
- Win32_SoftwareFeatureCheck,
- Win32_SoftwareFeatureParent,
- Win32_SoftwareFeatureSoftwareElements,
- Win32_SoundDevice,
- Win32_StartupCommand,
- Win32_SubDirectory,
- Win32_SystemAccount,
- Win32_SystemBIOS,
- Win32_SystemBootConfiguration,
- Win32_SystemDesktop,
- Win32_SystemDevices,
- Win32_SystemDriver,
- Win32_SystemDriverPNPEntity,
- Win32_SystemEnclosure,
- Win32_SystemLoadOrderGroups,
- Win32_SystemLogicalMemoryConfiguration,
- Win32_SystemMemoryResource,
- Win32_SystemnetworkConnections,
- Win32_SystemOperatingSystem,
- Win32_SystemPartitions,
- Win32_SystemProcesses,
- Win32_SystemProgramGroups,
- Win32_SystemResources,
- Win32_SystemServices,
- Win32_SystemSetting,
- Win32_SystemSlot,
- Win32_SystemSystemDriver,
- Win32_SystemTimeZone,
- Win32_SystemUsers,
- Win32_TCPIPPrinterPort,
- Win32_TapeDrive,
- Win32_TemperatureProbe,
- Win32_Thread,
- Win32_TimeZone,
- Win32_Trustee,
- Win32_TypeLibraryAction,
- Win32_UninterruptiblePowerSupply,
- Win32_USBController,
- Win32_USBControllerDevice,
- Win32_UserAccount,
- Win32_UserDesktop,
- Win32_VideoConfiguration,
- Win32_VideoController,
- Win32_VideoSettings,
- Win32_VoltageProbe,
- Win32_WMIElementSetting,
- Win32_WMISetting,
- }
全部key值
获取windows 操作系统下的硬件或操作系统信息等的更多相关文章
- 反射实现Model修改前后的内容对比 【API调用】腾讯云短信 Windows操作系统下Redis服务安装图文详解 Redis入门学习
反射实现Model修改前后的内容对比 在开发过程中,我们会遇到这样一个问题,编辑了一个对象之后,我们想要把这个对象修改了哪些内容保存下来,以便将来查看和追责. 首先我们要创建一个User类 1 p ...
- Windows操作系统下远程连接MySQL数据库
用Eclipse做一个后台项目,但是数据库不想放在本地电脑,于是买了一个腾讯云服务器(学生有优惠,挺便宜的),装上MySQL数据库,但是测试连接的时候,发现总是连接不是上,但是本地数据库可以连接,于是 ...
- 获取Windows服务下当前路径的方法
获取Windows服务下当前路径的方法 获取当前运行程序路径 包含exe Assembly.GetExecutingAssembly().Location; D:\xxxxxx\bin\Debug\x ...
- Windows操作系统下搭建Git服务器和客户端。
本文将介绍如何在Windows操作系统下搭建Git服务器和客户端.服务器端采用的是Bonobo Git Server,一款用ASP.NET MVC开发的Git源代码管理工具,界面简洁,基于Web方式配 ...
- Windows操作系统下SVN无法上传*.o文件
Windows操作系统下SVN无法上传*.o文件 2017年09月07日 10:14:49 yanlaifan 阅读数:834 摘自:https://blog.csdn.net/yanlaifan/ ...
- [学习分享] 在Windows操作系统下如何安装RMySQL包
最近在做股票的高频交易数据分析,需要用到数据库,而我只对MySQL比较熟悉,于是就安装了MySQL.当我安装好了MySQL后,正兴冲冲地准备安装RMySQL包时,问题来了:RMySQL包不支持wind ...
- 获取Windows平台下 安装office 版本位数信息
最近在处理客户端安装程序过程,有一个需求:需要检测Windows平台下安装office 版本信息以及获取使用的office是32 位还是64 位: 当检测出office 位数为64位时,提示当前off ...
- 简单对比一下不同Windows操作系统在相同硬件配置的情况下浏览器js引擎的性能
最近部门进行Windows客户端的测试产品单点性能, 感觉不在通的windows版本以及浏览器内核的情况下性能可能有差异, 也一直没有找到一个比较好的对比工具, 今天用chrome的控制台简单测试了下 ...
- Windows操作系统下安装Ubuntu虚拟机
认识VMware虚拟机 VMware(虚拟机)是指通过软件模拟的具有完整硬件系统功能的.运行在一个完全隔离环境中的完整计算机系统,它能在Windows系统上虚拟出多个计算机,每个虚拟计算机可以独立运行 ...
随机推荐
- CosId 1.0.0 发布,通用、灵活、高性能的分布式 ID 生成器
CosId 通用.灵活.高性能的分布式 ID 生成器 介绍 CosId 旨在提供通用.灵活.高性能的分布式系统 ID 生成器. 目前提供了俩大类 ID 生成器:SnowflakeId (单机 TPS ...
- Kubernetes网络的iptables模式和ipvs模式支持ping分析
1.iptables模式无法ping通原因分析 iptables模式下,无法ping通任何svc,包括clusterip.所有ns下,下面来分析原因: 查看kubernetes的网络模式 curl 1 ...
- 4.QT:spinbox(spindoublebox)控件的信号响应
Qt的QSpinBox和QDoubleSpinBox两个控件在默认情况下是valueChanged信号,会响应每次输入栏的改变. 比如想要输入数值"123",我们会依次键入1 - ...
- 基于xtrabackup的主从同步
基于xtrabackup的主从同步 作者 刘畅 时间 2020-9-21 服务器版本:CentOS Linux release 7.5.1804 主机名 ip地址 服务器配置 安装软件 密码 mysq ...
- 关于asp.net中Repeater控件的一些应用
在Asp.net中,我是比较喜欢用Repeater这个控件,刚刚遇到的一个问题,怎么实现单击 <asp:LinkButton>,通过后台的单击事件获取同一行数据中的其他数据(对象). 1, ...
- Nginx:Nginx日志切割方法
Nginx的日志文件是没有切割(rotate)功能的,但是我们可以写一个脚本来自动切割日志文件. 首先我们要注意两点: 1.切割的日志文件是不重名的,所以需要我们自定义名称,一般就是时间日期做文件名. ...
- hadoop学习(三)HDFS常用命令以及java操作HDFS
一.HDFS的常用命令 1.查看根目录下的信息:./hadoop dfs -ls 2.查看根目录下的in目录中的内容:./hadoop dfs -ls in或者./hadoop dfs -ls ./i ...
- 【转载】每天一个linux命令(11):nl命令
转载至:http://www.cnblogs.com/peida/archive/2012/11/01/2749048.html nl命令在linux系统中用来计算文件中行号.nl 可以将输出的文件内 ...
- 架构之:REST和RESTful
目录 简介 REST REST和RESTful API REST架构的基本原则 Uniform interface统一的接口 Client–server 客户端和服务器端独立 Stateless无状态 ...
- python django与celery的集成
一.celery与django 关于celery介绍和使用可以查看上篇Python中任务队列-芹菜celery的使用 关于django的介绍和使用可查看python django框架+vue.js前后 ...