string _operatingSystem=""; string _osArchitecture=""; using (ManagementObjectSearcher win32OperatingSystem = new ManagementObjectSearcher("select * from Win32_OperatingSystem")) { foreach (ManagementObject obj in win32OperatingSystem.Get()) { _operatingSystem = obj["Caption"].ToString(); _osArchitecture = obj["OSArchitecture"].ToString(); break; } }
|
请发表评论