└── src ├── ComputerInfo ├── obj │ └── Debug │ │ ├── ComputerInfo.csproj.CopyComplete │ │ ├── ComputerInfo.csproj.CoreCompileInputs.cache │ │ ├── ComputerInfo.exe │ │ ├── ComputerInfo.pdb │ │ ├── ComputerInfo.csprojAssemblyReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ └── ComputerInfo.csproj.FileListAbsolute.txt ├── bin │ └── Debug │ │ ├── ComputerInfo.exe │ │ ├── ComputerInfo.pdb │ │ ├── Newtonsoft.Json.dll │ │ ├── System.Runtime.InteropServices.RuntimeInformation.dll │ │ └── ComputerInfo.exe.config ├── App.config ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── Program.cs ├── ComputerInfo.csproj └── Computer.cs ├── packages ├── System.Runtime.InteropServices.RuntimeInformation.4.3.0 │ ├── lib │ │ ├── MonoTouch10 │ │ │ └── _._ │ │ ├── MonoAndroid10 │ │ │ └── _._ │ │ ├── xamarinios10 │ │ │ └── _._ │ │ ├── xamarinmac20 │ │ │ └── _._ │ │ ├── xamarintvos10 │ │ │ └── _._ │ │ ├── xamarinwatchos10 │ │ │ └── _._ │ │ ├── win8 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ ├── net45 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ ├── wpa81 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ └── netstandard1.1 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ ├── ref │ │ ├── MonoTouch10 │ │ │ └── _._ │ │ ├── MonoAndroid10 │ │ │ └── _._ │ │ ├── xamarinios10 │ │ │ └── _._ │ │ ├── xamarinmac20 │ │ │ └── _._ │ │ ├── xamarintvos10 │ │ │ └── _._ │ │ ├── xamarinwatchos10 │ │ │ └── _._ │ │ └── netstandard1.1 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ ├── .signature.p7s │ ├── System.Runtime.InteropServices.RuntimeInformation.4.3.0.nupkg │ ├── runtimes │ │ ├── win │ │ │ └── lib │ │ │ │ ├── net45 │ │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ │ │ ├── netcore50 │ │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ │ │ └── netstandard1.1 │ │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ ├── aot │ │ │ └── lib │ │ │ │ └── netcore50 │ │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ │ └── unix │ │ │ └── lib │ │ │ └── netstandard1.1 │ │ │ └── System.Runtime.InteropServices.RuntimeInformation.dll │ ├── ThirdPartyNotices.txt │ └── dotnet_library_license.txt └── Newtonsoft.Json.12.0.3 │ ├── .signature.p7s │ ├── packageIcon.png │ ├── Newtonsoft.Json.12.0.3.nupkg │ ├── lib │ ├── net20 │ │ └── Newtonsoft.Json.dll │ ├── net35 │ │ └── Newtonsoft.Json.dll │ ├── net40 │ │ └── Newtonsoft.Json.dll │ ├── net45 │ │ └── Newtonsoft.Json.dll │ ├── netstandard1.0 │ │ └── Newtonsoft.Json.dll │ ├── netstandard1.3 │ │ └── Newtonsoft.Json.dll │ ├── netstandard2.0 │ │ └── Newtonsoft.Json.dll │ ├── portable-net45+win8+wp8+wpa81 │ │ └── Newtonsoft.Json.dll │ └── portable-net40+sl5+win8+wp8+wpa81 │ │ └── Newtonsoft.Json.dll │ └── LICENSE.md ├── .vs └── ComputerInfo │ └── v16 │ └── .suo └── ComputerInfo.sln /src/ComputerInfo/obj/Debug/ComputerInfo.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/MonoTouch10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/MonoTouch10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/MonoAndroid10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/xamarinios10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/xamarinmac20/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/xamarintvos10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/xamarinwatchos10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/MonoAndroid10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/xamarinios10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/xamarinmac20/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/xamarintvos10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/xamarinwatchos10/_._: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/ComputerInfo.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 1004edd0ff2e633be1df27d8cfde23ae0e910a23 2 | -------------------------------------------------------------------------------- /src/.vs/ComputerInfo/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/.vs/ComputerInfo/v16/.suo -------------------------------------------------------------------------------- /src/ComputerInfo/bin/Debug/ComputerInfo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/bin/Debug/ComputerInfo.exe -------------------------------------------------------------------------------- /src/ComputerInfo/bin/Debug/ComputerInfo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/bin/Debug/ComputerInfo.pdb -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/ComputerInfo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/obj/Debug/ComputerInfo.exe -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/ComputerInfo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/obj/Debug/ComputerInfo.pdb -------------------------------------------------------------------------------- /src/ComputerInfo/bin/Debug/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/bin/Debug/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/.signature.p7s -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/packageIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/packageIcon.png -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/ComputerInfo.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/obj/Debug/ComputerInfo.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/ComputerInfo/bin/Debug/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/ComputerInfo/bin/Debug/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/ComputerInfo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/.signature.p7s -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /src/ComputerInfo/bin/Debug/ComputerInfo.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /src/ComputerInfo/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/System.Runtime.InteropServices.RuntimeInformation.4.3.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/System.Runtime.InteropServices.RuntimeInformation.4.3.0.nupkg -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dwayne112401/ComputerInfo/HEAD/src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll -------------------------------------------------------------------------------- /src/ComputerInfo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("ComputerInfo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("ComputerInfo")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("ef1dfbfb-f04e-4de2-842d-c19a07a9f07c")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/packages/Newtonsoft.Json.12.0.3/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2007 James Newton-King 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/ComputerInfo.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30611.23 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerInfo", "ComputerInfo\ComputerInfo.csproj", "{EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5C039F74-4ECB-48E0-9905-D71BAB4EB201} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/ComputerInfo/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ComputerInfo 8 | { 9 | class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | Console.WriteLine($"操作系统版本: {Computer.OSDescription}"); 14 | Console.WriteLine($"操作系统架构: {Computer.OSArchitecture}"); 15 | Console.WriteLine($"是否为Windows系统:{Computer.OSArchitecture}"); 16 | Console.WriteLine($"计算机名称: {Computer.ComputerName}"); 17 | Console.WriteLine($"计算机用户: {Computer.UserName}"); 18 | 19 | Console.WriteLine("-------------------------电脑型号-------------------------"); 20 | Console.WriteLine(Computer.GetComputerVersion()); 21 | 22 | Console.WriteLine("-------------------------主板信息-------------------------"); 23 | Console.WriteLine(Computer.GetBaseBoardInfo()); 24 | 25 | Console.WriteLine("-------------------------处理器信息------------------------"); 26 | Console.WriteLine(Computer.GetCPUInfo()); 27 | 28 | Console.WriteLine("-------------------------内存信息-------------------------"); 29 | Console.WriteLine(Computer.GetRAMInfo()); 30 | 31 | Console.WriteLine("-------------------------显卡信息-------------------------"); 32 | Console.WriteLine(Computer.GetGPUInfo()); 33 | 34 | Console.WriteLine("-------------------------硬盘信息-------------------------"); 35 | Console.WriteLine(Computer.GetDiskInfo()); 36 | Console.ReadKey(); 37 | } 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/ThirdPartyNotices.txt: -------------------------------------------------------------------------------- 1 | This Microsoft .NET Library may incorporate components from the projects listed 2 | below. Microsoft licenses these components under the Microsoft .NET Library 3 | software license terms. The original copyright notices and the licenses under 4 | which Microsoft received such components are set forth below for informational 5 | purposes only. Microsoft reserves all rights not expressly granted herein, 6 | whether by implication, estoppel or otherwise. 7 | 8 | 1. .NET Core (https://github.com/dotnet/core/) 9 | 10 | .NET Core 11 | Copyright (c) .NET Foundation and Contributors 12 | 13 | The MIT License (MIT) 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. -------------------------------------------------------------------------------- /src/ComputerInfo/obj/Debug/ComputerInfo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\ComputerInfo.exe.config 2 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\ComputerInfo.exe 3 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\ComputerInfo.pdb 4 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\Newtonsoft.Json.dll 5 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\Newtonsoft.Json.xml 6 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\obj\Debug\ComputerInfo.csprojAssemblyReference.cache 7 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\obj\Debug\ComputerInfo.csproj.CoreCompileInputs.cache 8 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\obj\Debug\ComputerInfo.csproj.CopyComplete 9 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\obj\Debug\ComputerInfo.exe 10 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\obj\Debug\ComputerInfo.pdb 11 | C:\Users\97460\source\repos\ComputerInfo\ComputerInfo\bin\Debug\System.Runtime.InteropServices.RuntimeInformation.dll 12 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\ComputerInfo.exe.config 13 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\ComputerInfo.exe 14 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\ComputerInfo.pdb 15 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\Newtonsoft.Json.dll 16 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\System.Runtime.InteropServices.RuntimeInformation.dll 17 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\bin\Debug\Newtonsoft.Json.xml 18 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\obj\Debug\ComputerInfo.csprojAssemblyReference.cache 19 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\obj\Debug\ComputerInfo.csproj.CoreCompileInputs.cache 20 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\obj\Debug\ComputerInfo.csproj.CopyComplete 21 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\obj\Debug\ComputerInfo.exe 22 | D:\@dwayne\@git\@github.dwayne\ComputerInfo\src\ComputerInfo\obj\Debug\ComputerInfo.pdb 23 | -------------------------------------------------------------------------------- /src/ComputerInfo/ComputerInfo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EF1DFBFB-F04E-4DE2-842D-C19A07A9F07C} 8 | Exe 9 | ComputerInfo 10 | ComputerInfo 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll 37 | 38 | 39 | 40 | 41 | 42 | 43 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/packages/System.Runtime.InteropServices.RuntimeInformation.4.3.0/dotnet_library_license.txt: -------------------------------------------------------------------------------- 1 | 2 | MICROSOFT SOFTWARE LICENSE TERMS 3 | 4 | 5 | MICROSOFT .NET LIBRARY 6 | 7 | These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft 8 | 9 | · updates, 10 | 11 | · supplements, 12 | 13 | · Internet-based services, and 14 | 15 | · support services 16 | 17 | for this software, unless other terms accompany those items. If so, those terms apply. 18 | 19 | BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. 20 | 21 | 22 | IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW. 23 | 24 | 1. INSTALLATION AND USE RIGHTS. 25 | 26 | a. Installation and Use. You may install and use any number of copies of the software to design, develop and test your programs. 27 | 28 | b. Third Party Programs. The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only. 29 | 30 | 2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS. 31 | 32 | a. DISTRIBUTABLE CODE. The software is comprised of Distributable Code. “Distributable Code” is code that you are permitted to distribute in programs you develop if you comply with the terms below. 33 | 34 | i. Right to Use and Distribute. 35 | 36 | · You may copy and distribute the object code form of the software. 37 | 38 | · Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs. 39 | 40 | ii. Distribution Requirements. For any Distributable Code you distribute, you must 41 | 42 | · add significant primary functionality to it in your programs; 43 | 44 | · require distributors and external end users to agree to terms that protect it at least as much as this agreement; 45 | 46 | · display your valid copyright notice on your programs; and 47 | 48 | · indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs. 49 | 50 | iii. Distribution Restrictions. You may not 51 | 52 | · alter any copyright, trademark or patent notice in the Distributable Code; 53 | 54 | · use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft; 55 | 56 | · include Distributable Code in malicious, deceptive or unlawful programs; or 57 | 58 | · modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that 59 | 60 | · the code be disclosed or distributed in source code form; or 61 | 62 | · others have the right to modify it. 63 | 64 | 3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not 65 | 66 | · work around any technical limitations in the software; 67 | 68 | · reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation; 69 | 70 | · publish the software for others to copy; 71 | 72 | · rent, lease or lend the software; 73 | 74 | · transfer the software or this agreement to any third party; or 75 | 76 | · use the software for commercial software hosting services. 77 | 78 | 4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software. 79 | 80 | 5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes. 81 | 82 | 6. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting. 83 | 84 | 7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it. 85 | 86 | 8. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services. 87 | 88 | 9. APPLICABLE LAW. 89 | 90 | a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. 91 | 92 | b. Outside the United States. If you acquired the software in any other country, the laws of that country apply. 93 | 94 | 10. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so. 95 | 96 | 11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 97 | 98 | FOR AUSTRALIA – YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS. 99 | 100 | 12. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES. 101 | 102 | This limitation applies to 103 | 104 | · anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and 105 | 106 | · claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. 107 | 108 | It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages. 109 | 110 | Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French. 111 | 112 | Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français. 113 | 114 | EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues. 115 | 116 | LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices. 117 | 118 | Cette limitation concerne : 119 | 120 | · tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et 121 | 122 | · les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur. 123 | 124 | Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard. 125 | 126 | EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas. 127 | 128 | 129 | -------------------------------------------------------------------------------- /src/ComputerInfo/Computer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Management; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Forms; 9 | 10 | namespace ComputerInfo 11 | { 12 | internal static class Computer 13 | { 14 | /// 15 | /// 操作系统版本 16 | /// 17 | public static string OSDescription { get; } = System.Runtime.InteropServices.RuntimeInformation.OSDescription; 18 | /// 19 | /// 操作系统架构() 20 | /// 21 | public static string OSArchitecture { get; } = System.Runtime.InteropServices.RuntimeInformation.OSArchitecture.ToString(); 22 | /// 23 | /// 是否为Windows操作系统 24 | /// 25 | public static bool IsOSPlatform { get; } = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows); 26 | /// 27 | /// 计算机名称 28 | /// 29 | public static string ComputerName { get; } = System.Environment.GetEnvironmentVariable("ComputerName"); 30 | /// 31 | /// 计算机用户 32 | /// 33 | public static string UserName { get; set; } = System.Environment.UserName; 34 | 35 | /// 36 | /// 电脑型号 37 | // Caption:计算机系统产品 38 | // Description:计算机系统产品 39 | // ElementName: 40 | // IdentifyingNumber:CND0162XZ1 41 | // InstanceID: 42 | // Name:HP ENVY x360 Convertible 15-ed0xxx 43 | // SKUNumber: 44 | // UUID:A6C31C0E-997C-EA11-8104-B05CDA905B6C 45 | // Vendor:HP 46 | // Version:Type1ProductConfigId 47 | // WarrantyDuration: 48 | // WarrantyStartDate: 49 | /// 50 | /// 51 | public static string GetComputerVersion() 52 | { 53 | var version = new StringBuilder(); 54 | var moc = new ManagementClass("Win32_ComputerSystemProduct").GetInstances(); 55 | foreach (ManagementObject mo in moc) 56 | { 57 | foreach (var item in mo.Properties) 58 | { 59 | version.Append($"{item.Name}:{item.Value}\r\n"); 60 | } 61 | } 62 | return version.ToString(); ; 63 | } 64 | 65 | /// 66 | /// 主板信息 67 | // Caption:简短说明 68 | // ConfigOptions:数组,表示位于在底板上跳线和开关的配置 69 | // CreationClassName:表示类的名称(就是Win32_baseboard类) 70 | // Depth:对象的描述(底板) 71 | // Description:基板 72 | // Height: 73 | // HostingBoard:如果为TRUE,该卡是一个主板,或在一个机箱中的基板。 74 | // HotSwappable:如果为TRUE,就是支持热插拔(判断是否支持热插拔) 75 | // InstallDate: 76 | // Manufacturer:表示制造商的名称 77 | // Model: 78 | // Name:对象的名称标签 79 | // OtherIdentifyingInfo: 80 | // PartNumber: 81 | // PoweredOn:如果为真,物理元素处于开机状态 82 | // Product:产品的型号 83 | // Removable:判断是否可拆卸的 84 | // Replaceable:判断是否可更换的 85 | // RequirementsDescription: 86 | // RequiresDaughterBoard:False 87 | // SerialNumber:制造商分配的用于识别所述物理元件数目 88 | // SKU: 89 | // SlotLayout: 90 | // SpecialRequirements: 91 | // Status:对象的当前状态 92 | // Tag:符系统的基板唯一标识 93 | // Version:08.32 94 | // Weight: 95 | // Width: 96 | /// 97 | /// 98 | public static string GetBaseBoardInfo() 99 | { 100 | var baseBoard = new StringBuilder(); 101 | var moc = new ManagementClass("Win32_BaseBoard").GetInstances(); 102 | foreach (ManagementObject mo in moc) 103 | { 104 | foreach (var item in mo.Properties) 105 | { 106 | baseBoard.Append($"{item.Name}:{item.Value}\r\n"); 107 | } 108 | } 109 | return baseBoard.ToString(); 110 | } 111 | 112 | /// 113 | /// 硬盘驱动器信息() 114 | // Access:0 115 | // Availability: 116 | // BlockSize: 117 | // Caption:硬盘描述,例如“C:” 118 | // Compressed:False 119 | // ConfigManagerErrorCode:Windows配置管理器错误代码 120 | // ConfigManagerUserConfig:如果为True,该设备使用用户定义的配置 121 | // CreationClassName:Win32_LogicalDisk 122 | // Description:本地固定磁盘 123 | // DeviceID:磁盘驱动器与系统中的其他设备的唯一标识符,例如“C:” 124 | // DriveType:3 125 | // ErrorCleared:如果为True,报告LastErrorCode错误现已清除 126 | // ErrorDescription:关于可能采取的纠正措施记录在LastErrorCode错误,和信息的详细信息 127 | // ErrorMethodology:误差检测和校正的类型被此设备支持 128 | // FileSystem:NTFS 129 | // FreeSpace:可使用硬盘大小 130 | // InstallDate: 131 | // LastErrorCode: 132 | // MaximumComponentLength:255 133 | // MediaType:由该设备使用或访问的媒体类型 134 | // Name:硬盘名字 135 | // NumberOfBlocks: 136 | // PNPDeviceID:即插即用逻辑设备的播放设备标识符 137 | // PowerManagementCapabilities: 138 | // PowerManagementSupported: 139 | // ProviderName: 140 | // Purpose: 141 | // QuotasDisabled:True 142 | // QuotasIncomplete:False 143 | // QuotasRebuilding:False 144 | // Size:硬盘总大小 145 | // Status:对象的当前状态 146 | // StatusInfo:逻辑设备的状态 147 | // SupportsDiskQuotas:True 148 | // SupportsFileBasedCompression:True 149 | // SystemCreationClassName:Win32_ComputerSystem 150 | // SystemName:DESKTOP-OLA70V5 151 | // VolumeDirty:False 152 | // VolumeName:Windows 153 | // VolumeSerialNumber:硬盘的序列号 154 | /// 155 | /// 156 | public static string GetDiskInfo() 157 | { 158 | var disk = new StringBuilder(); 159 | var moc = new ManagementClass("Win32_LogicalDisk").GetInstances(); 160 | foreach (ManagementObject mo in moc) 161 | { 162 | foreach (var item in mo.Properties) 163 | { 164 | disk.Append($"{item.Name}:{item.Value}\r\n"); 165 | } 166 | } 167 | return disk.ToString(); 168 | } 169 | 170 | /// 171 | /// 处理器信息() 172 | // AddressWidth:在32位操作系统,该值是32,在64位操作系统是64 173 | // Architecture:所使用的平台的处理器架构 174 | // AssetTag:代表该处理器的资产标签 175 | // Availability:设备的状态 176 | // Caption:设备的简短描述 177 | // Characteristics:处理器支持定义的功能 178 | // ConfigManagerErrorCode:Windows API的配置管理器错误代码 179 | // ConfigManagerUserConfig:如果为TRUE,该装置是使用用户定义的配置 180 | // CpuStatus:处理器的当前状态 181 | // CreationClassName:出现在用来创建一个实例继承链的第一个具体类的名称 182 | // CurrentClockSpeed:处理器的当前速度,以MHz为单位 183 | // CurrentVoltage:处理器的电压。如果第八位被设置,位0-6包含电压乘以10,如果第八位没有置位,则位在VoltageCaps设定表示的电压值。 CurrentVoltage时SMBIOS指定的电压值只设置 184 | // DataWidth:在32位处理器,该值是32,在64位处理器是64 185 | // Description:描述 186 | // DeviceID:在系统上的处理器的唯一标识符 187 | // ErrorCleared:如果为真,报上一个错误代码的被清除 188 | // ErrorDescription:错误的代码描述 189 | // ExtClock:外部时钟频率,以MHz为单位 190 | // Family:处理器系列类型 191 | // InstallDate:安装日期 192 | // L2CacheSize:二级缓存大小 193 | // L2CacheSpeed:二级缓存处理器的时钟速度 194 | // L3CacheSize:三级缓存大小 195 | // L3CacheSpeed:三级缓存处理器的时钟速度 196 | // LastErrorCode:报告的逻辑设备上一个错误代码 197 | // Level:处理器类型的定义。该值取决于处理器的体系结构 198 | // LoadPercentage:每个处理器的负载能力,平均到最后一秒 199 | // Manufacturer:处理器的制造商 200 | // MaxClockSpeed:处理器的最大速度,以MHz为单位 201 | // Name:处理器的名称 202 | // NumberOfCores:处理器的当前实例的数目。核心是在集成电路上的物理处理器 203 | // NumberOfEnabledCore:每个处理器插槽启用的内核数 204 | // NumberOfLogicalProcessors:用于处理器的当前实例逻辑处理器的数量 205 | // OtherFamilyDescription:处理器系列类型 206 | // PartNumber:这款处理器的产品编号制造商所设置 207 | // PNPDeviceID:即插即用逻辑设备的播放设备标识符 208 | // PowerManagementCapabilities:逻辑设备的特定功率相关的能力阵列 209 | // PowerManagementSupported:如果为TRUE,该装置的功率可以被管理,这意味着它可以被放入挂起模式 210 | // ProcessorId:描述处理器功能的处理器的信息 211 | // ProcessorType:处理器的主要功能 212 | // Revision:系统修订级别取决于体系结构 213 | // Role:所述处理器的作用 214 | // SecondLevelAddressTranslationExtensions:如果为True,该处理器支持用于虚拟地址转换扩展 215 | // SerialNumber:处理器的序列号 216 | // SocketDesignation:芯片插座的线路上使用的类型 217 | // Status:对象的当前状态 218 | // StatusInfo:对象的当前状态信息 219 | // Stepping:在处理器家族处理器的版本 220 | // SystemCreationClassName:创建类名属性的作用域计算机的价值 221 | // SystemName:系统的名称 222 | // ThreadCount:每个处理器插槽的线程数 223 | // UniqueId:全局唯一标识符的处理器 224 | // UpgradeMethod:CPU插槽的信息 225 | // Version:依赖于架构处理器的版本号 226 | // VirtualizationFirmwareEnabled:如果真,固件可以虚拟化扩展 227 | // VMMonitorModeExtensions:如果为True,该处理器支持Intel或AMD虚拟机监控器扩展。 228 | // VoltageCaps:该处理器的电压的能力 229 | /// 230 | /// 231 | public static string GetCPUInfo() 232 | { 233 | var cpu = new StringBuilder(); 234 | var moc = new ManagementClass("Win32_Processor").GetInstances(); 235 | foreach (var mo in moc) 236 | { 237 | foreach (var item in mo.Properties) 238 | { 239 | cpu.Append($"{item.Name}:{item.Value}\r\n"); 240 | } 241 | } 242 | return cpu.ToString(); 243 | } 244 | 245 | /// 246 | /// 内存信息() 247 | // Attributes:1 248 | // BankLabel:BANK 2 249 | // Capacity:获取内存容量(单位KB) 250 | // Caption:物理内存还虚拟内存 251 | // ConfiguredClockSpeed:配置时钟速度 252 | // ConfiguredVoltage:配置电压 253 | // CreationClassName:创建类名 254 | // DataWidth:获取内存带宽 255 | // Description:描述 256 | // DeviceLocator:获取设备定位器 257 | // FormFactor:构成因素 258 | // HotSwappable:是否支持热插拔 259 | // InstallDate:安装日期 260 | // InterleaveDataDepth:数据交错深度 261 | // InterleavePosition:数据交错的位置 262 | // Manufacturer:生产商 263 | // MaxVoltage:最大电压 264 | // MemoryType:内存类型 265 | // MinVoltage:最小电压 266 | // Model:型号 267 | // Name:名字 268 | // OtherIdentifyingInfo:其他识别信息 269 | // PartNumber:零件编号 270 | // PositionInRow:行位置 271 | // PoweredOn:是否接通电源 272 | // Removable:是否可拆卸 273 | // Replaceable:是否可更换 274 | // SerialNumber:编号 275 | // SKU:SKU号 276 | // SMBIOSMemoryType:SMBIOS内存类型 277 | // Speed:速率 278 | // Status:状态 279 | // Tag:唯一标识符的物理存储器 280 | // TotalWidth:总宽 281 | // TypeDetail:类型详细信息 282 | // Version:版本信息 283 | // AvailableBytes:可利用内存大小(B) 284 | // AvailableKBytes:可利用内存大小(KB) 285 | // AvailableMBytes:可利用内存大小(MB) 286 | // CacheBytes:125460480 287 | // CacheBytesPeak:392294400 288 | // CacheFaultsPersec:70774721 289 | // Caption: 290 | // CommitLimit:31939616768 291 | // CommittedBytes:20280020992 292 | // DemandZeroFaultsPersec:759274721 293 | // Description: 294 | // FreeAndZeroPageListBytes:2097152 295 | // FreeSystemPageTableEntries:12528527 296 | // Frequency_Object:0 297 | // Frequency_PerfTime:10000000 298 | // Frequency_Sys100NS:10000000 299 | // LongTermAverageStandbyCacheLifetimes:14400 300 | // ModifiedPageListBytes:41500672 301 | // Name: 302 | // PageFaultsPersec:1560432075 303 | // PageReadsPersec:19173703 304 | // PagesInputPersec:98834167 305 | // PagesOutputPersec:25921396 306 | // PagesPersec:124755563 307 | // PageWritesPersec:103362 308 | // PercentCommittedBytesInUse:2727084283 309 | // PercentCommittedBytesInUse_Base:4294967295 310 | // PoolNonpagedAllocs:0 311 | // PoolNonpagedBytes:798519296 312 | // PoolPagedAllocs:0 313 | // PoolPagedBytes:709898240 314 | // PoolPagedResidentBytes:496873472 315 | // StandbyCacheCoreBytes:247545856 316 | // StandbyCacheNormalPriorityBytes:847036416 317 | // StandbyCacheReserveBytes:0 318 | // SystemCacheResidentBytes:125460480 319 | // SystemCodeResidentBytes:0 320 | // SystemCodeTotalBytes:0 321 | // SystemDriverResidentBytes:17592179236864 322 | // SystemDriverTotalBytes:16953344 323 | // Timestamp_Object:0 324 | // Timestamp_PerfTime:5838028983825 325 | // Timestamp_Sys100NS:132532052633540000 326 | // TransitionFaultsPersec:792343233 327 | // TransitionPagesRePurposedPersec:78554340 328 | // WriteCopiesPersec:17253788 329 | /// 330 | /// 331 | public static string GetRAMInfo() 332 | { 333 | var ram = new StringBuilder(); 334 | var searcher = new ManagementObjectSearcher() 335 | { 336 | Query = new SelectQuery("Win32_PhysicalMemory"), 337 | }.Get().GetEnumerator(); 338 | 339 | while (searcher.MoveNext()) 340 | { 341 | ManagementBaseObject baseObj = searcher.Current; 342 | foreach (var item in baseObj.Properties) 343 | { 344 | ram.Append($"{item.Name}:{item.Value}\r\n"); 345 | } 346 | } 347 | 348 | searcher = new ManagementObjectSearcher() 349 | { 350 | Query = new SelectQuery("Win32_PerfRawData_PerfOS_Memory"), 351 | }.Get().GetEnumerator(); 352 | 353 | while (searcher.MoveNext()) 354 | { 355 | ManagementBaseObject baseObj = searcher.Current; 356 | foreach (var item in baseObj.Properties) 357 | { 358 | ram.Append($"{item.Name}:{item.Value}\r\n"); 359 | } 360 | } 361 | return ram.ToString(); 362 | } 363 | 364 | /// 365 | /// 显卡信息 366 | // AcceleratorCapabilities: 367 | // AdapterCompatibility:Intel Corporation 368 | // AdapterDACType:Internal 369 | // AdapterRAM:1073741824 370 | // Availability:3 371 | // CapabilityDescriptions: 372 | // Caption:Intel(R) UHD Graphics 373 | // ColorTableEntries: 374 | // ConfigManagerErrorCode:0 375 | // ConfigManagerUserConfig:False 376 | // CreationClassName:Win32_VideoController 377 | // CurrentBitsPerPixel:32 378 | // CurrentHorizontalResolution:1920 379 | // CurrentNumberOfColors:4294967296 380 | // CurrentNumberOfColumns:0 381 | // CurrentNumberOfRows:0 382 | // CurrentRefreshRate:60 383 | // CurrentScanMode:4 384 | // CurrentVerticalResolution:1080 385 | // Description:Intel(R) UHD Graphics 386 | // DeviceID:VideoController1 387 | // DeviceSpecificPens: 388 | // DitherType:0 389 | // DriverDate:20200109000000.000000-000 390 | // DriverVersion:26.20.100.7755 391 | // ErrorCleared: 392 | // ErrorDescription: 393 | // ICMIntent: 394 | // ICMMethod: 395 | // InfFilename:oem41.inf 396 | // InfSection:iCML_w10_DS 397 | // InstallDate: 398 | // InstalledDisplayDrivers:C:\windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_d512f7a0dbcb7a2f\igdumdim64.dll,C:\windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_d512f7a0dbcb7a2f\igd10iumd64.dll,C:\windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_d512f7a0dbcb7a2f\igd10iumd64.dll,C:\windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_d512f7a0dbcb7a2f\igd12umd64.dll 399 | // LastErrorCode: 400 | // MaxMemorySupported: 401 | // MaxNumberControlled: 402 | // MaxRefreshRate:75 403 | // MinRefreshRate:50 404 | // Monochrome:False 405 | // Name:Intel(R) UHD Graphics 406 | // NumberOfColorPlanes: 407 | // NumberOfVideoPages: 408 | // PNPDeviceID:PCI\VEN_8086&DEV_9B41&SUBSYS_8757103C&REV_02\3&11583659&2&10 409 | // PowerManagementCapabilities: 410 | // PowerManagementSupported: 411 | // ProtocolSupported: 412 | // ReservedSystemPaletteEntries: 413 | // SpecificationVersion: 414 | // Status:OK 415 | // StatusInfo: 416 | // SystemCreationClassName:Win32_ComputerSystem 417 | // SystemName:DESKTOP-OLA70V5 418 | // SystemPaletteEntries: 419 | // TimeOfLastReset: 420 | // VideoArchitecture:5 421 | // VideoMemoryType:2 422 | // VideoMode: 423 | // VideoModeDescription:屏幕描述 424 | // VideoProcessor:Intel(R) UHD Graphics Family 425 | // AcceleratorCapabilities: 426 | // AdapterCompatibility:NVIDIA 427 | // AdapterDACType:Integrated RAMDAC 428 | // AdapterRAM:4293918720 429 | // Availability:8 430 | // CapabilityDescriptions: 431 | // Caption:显卡描述 432 | // ColorTableEntries: 433 | // ConfigManagerErrorCode:0 434 | // ConfigManagerUserConfig:False 435 | // CreationClassName:Win32_VideoController 436 | // CurrentBitsPerPixel: 437 | // CurrentHorizontalResolution: 438 | // CurrentNumberOfColors: 439 | // CurrentNumberOfColumns: 440 | // CurrentNumberOfRows: 441 | // CurrentRefreshRate: 442 | // CurrentScanMode: 443 | // CurrentVerticalResolution: 444 | // Description:NVIDIA GeForce MX330 445 | // DeviceID:VideoController2 446 | // DeviceSpecificPens: 447 | // DitherType: 448 | // DriverDate:20200923000000.000000-000 449 | // DriverVersion:27.21.14.5241 450 | // ErrorCleared: 451 | // ErrorDescription: 452 | // ICMIntent: 453 | // ICMMethod: 454 | // InfFilename:oem123.inf 455 | // InfSection:Section043 456 | // InstallDate: 457 | // InstalledDisplayDrivers:C:\windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_c87780efe1918cc5\nvldumdx.dll,C:\windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_c87780efe1918cc5\nvldumdx.dll,C:\windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_c87780efe1918cc5\nvldumdx.dll,C:\windows\System32\DriverStore\FileRepository\nvhm.inf_amd64_c87780efe1918cc5\nvldumdx.dll 458 | // LastErrorCode: 459 | // MaxMemorySupported: 460 | // MaxNumberControlled: 461 | // MaxRefreshRate: 462 | // MinRefreshRate: 463 | // Monochrome:False 464 | // Name:NVIDIA GeForce MX330 465 | // NumberOfColorPlanes: 466 | // NumberOfVideoPages: 467 | // PNPDeviceID:PCI\VEN_10DE&DEV_1D16&SUBSYS_8757103C&REV_A1\4&24375CB2&0&00E0 468 | // PowerManagementCapabilities: 469 | // PowerManagementSupported: 470 | // ProtocolSupported: 471 | // ReservedSystemPaletteEntries: 472 | // SpecificationVersion: 473 | // Status:OK 474 | // StatusInfo: 475 | // SystemCreationClassName:Win32_ComputerSystem 476 | // SystemName:DESKTOP-OLA70V5 477 | // SystemPaletteEntries: 478 | // TimeOfLastReset: 479 | // VideoArchitecture:5 480 | // VideoMemoryType:2 481 | // VideoMode: 482 | // VideoModeDescription: 483 | // VideoProcessor:GeForce MX330 484 | /// 485 | /// 486 | public static string GetGPUInfo() 487 | { 488 | var gpu = new StringBuilder(); 489 | var moc = new ManagementObjectSearcher("select * from Win32_VideoController").Get(); 490 | 491 | foreach (var mo in moc) 492 | { 493 | foreach (var item in mo.Properties) 494 | { 495 | gpu.Append($"{item.Name}:{item.Value}\r\n"); 496 | } 497 | } 498 | return gpu.ToString(); ; 499 | } 500 | } 501 | } 502 | --------------------------------------------------------------------------------