Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
592bd17
Upgrade Project to dotnet 8
gus33000 Sep 6, 2024
ae6f97b
Refactor a few bits
gus33000 Sep 6, 2024
1c3edc0
Cleanup CTAC attributes building
gus33000 Sep 6, 2024
2d31e3a
Make the ImageUpdate Namespace a constant
gus33000 Sep 6, 2024
dd1f690
Further splitting of inner classes
gus33000 Sep 7, 2024
f402356
fix: Export CHID api
gus33000 Sep 7, 2024
979ddcc
CompDB: Fix compat between DM and CDB
gus33000 Sep 7, 2024
b05ec03
CompDB -> BaseManifest
gus33000 Sep 7, 2024
4de985c
Add CHID unit tests
gus33000 Sep 7, 2024
b837c01
Add program to fetch CHIDs
gus33000 Sep 7, 2024
53a7685
Cleanup CHID Program main class
gus33000 Sep 7, 2024
5bc3ae0
Move option classes to a specific namespace
gus33000 Sep 7, 2024
19c376c
Enable file names for driver packages
gus33000 Sep 7, 2024
0ae4ddd
fixes
gus33000 Sep 7, 2024
dca3d0d
fix: file duplication issue with osupdates
gus33000 Sep 7, 2024
eb30ac0
Split off separate files in download lib
gus33000 Sep 7, 2024
5035e94
Enable BSP downloads
gus33000 Sep 7, 2024
c987935
Split off the reference drivers repo implementation
gus33000 Sep 7, 2024
5c2bf92
Implement the ability to fetch specific drivers via CLI
gus33000 Sep 7, 2024
bca87f0
Add auto fetch of current computer information
gus33000 Sep 7, 2024
b4738e4
Update folder names used for driver product updates
gus33000 Sep 7, 2024
36b2e34
Cleanup CHID tool code
gus33000 Sep 7, 2024
57350a2
Sync CHID auto fetch code
gus33000 Sep 7, 2024
b051b7a
Cleanup
gus33000 Sep 7, 2024
05ae0a2
Update ci.yml
gus33000 Sep 17, 2024
8c91b0a
Add configuration for RUN
gus33000 Oct 11, 2024
3de2e75
Merge branch 'main' into feat/uup_bsp_product_download
gus33000 May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Build CLI utilities
shell: pwsh
run: |
msbuild /m /t:restore,cli\uupmediaconverter:publish,cli\uupdownload:publish /p:Platform=${{ matrix.architecture }} /p:RuntimeIdentifier=${{ matrix.platform }}-${{ matrix.architecture }} /p:PublishDir=${{ github.workspace }}/artifacts/${{ matrix.platform }}-${{ matrix.architecture }}/CLIs /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release UUPMediaCreator.sln
msbuild /m /t:restore,cli\uupmediaconverter:publish,cli\uupdownload:publish /p:Platform=${{ matrix.architecture }} /p:RuntimeIdentifier=${{ matrix.platform }}-${{ matrix.architecture }} /p:PublishDir=${{ github.workspace }}/artifacts/${{ matrix.platform }}-${{ matrix.architecture }}/CLIs /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release /p:IncludeNativeLibrariesForSelfExtract=true UUPMediaCreator.sln

- name: Create PDB Output Directory
shell: pwsh
Expand Down
114 changes: 114 additions & 0 deletions UUPMediaCreator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Windows.Internal.Flighting"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground", "src\Applications\Playground\Playground.csproj", "{CB4B918C-3DBD-40AA-99F7-83EF033DB8A8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting", "src\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting.csproj", "{7AFF6421-B605-43F1-B849-D331E979B3B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnifiedUpdatePlatform.Services.WindowsUpdate.ESRP", "src\UnifiedUpdatePlatform.Services.WindowsUpdate.ESRP\UnifiedUpdatePlatform.Services.WindowsUpdate.ESRP.csproj", "{E5A8D8A2-6219-4632-84EC-8F8BF625A596}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnifiedUpdatePlatform.Services.WindowsUpdate.Models", "src\UnifiedUpdatePlatform.Services.WindowsUpdate.Models\UnifiedUpdatePlatform.Services.WindowsUpdate.Models.csproj", "{D78B2286-F75B-4FE6-990B-84117E722CD4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting.Tests", "src\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting.Tests\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting.Tests.csproj", "{95007D84-20A1-4711-9CBC-DEE3B1798E74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerHardwareIds", "src\Applications\ComputerHardwareIds\ComputerHardwareIds.csproj", "{7955FADE-628E-4E41-B48B-350EFB5418E7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UUPSort", "src\Applications\UUPSort\UUPSort.csproj", "{21630DC1-A538-4198-A2C5-C38D9CDA0FB1}"
EndProject
Global
Expand Down Expand Up @@ -419,6 +428,106 @@ Global
{CB4B918C-3DBD-40AA-99F7-83EF033DB8A8}.Release|x64.Build.0 = Release|Any CPU
{CB4B918C-3DBD-40AA-99F7-83EF033DB8A8}.Release|x86.ActiveCfg = Release|Any CPU
{CB4B918C-3DBD-40AA-99F7-83EF033DB8A8}.Release|x86.Build.0 = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|ARM.Build.0 = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|arm64.ActiveCfg = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|arm64.Build.0 = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|x64.ActiveCfg = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|x64.Build.0 = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|x86.ActiveCfg = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Debug|x86.Build.0 = Debug|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|Any CPU.Build.0 = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|ARM.ActiveCfg = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|ARM.Build.0 = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|arm64.ActiveCfg = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|arm64.Build.0 = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|x64.ActiveCfg = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|x64.Build.0 = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|x86.ActiveCfg = Release|Any CPU
{7AFF6421-B605-43F1-B849-D331E979B3B1}.Release|x86.Build.0 = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|ARM.Build.0 = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|arm64.ActiveCfg = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|arm64.Build.0 = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|x64.ActiveCfg = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|x64.Build.0 = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|x86.ActiveCfg = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Debug|x86.Build.0 = Debug|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|Any CPU.Build.0 = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|ARM.ActiveCfg = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|ARM.Build.0 = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|arm64.ActiveCfg = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|arm64.Build.0 = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|x64.ActiveCfg = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|x64.Build.0 = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|x86.ActiveCfg = Release|Any CPU
{E5A8D8A2-6219-4632-84EC-8F8BF625A596}.Release|x86.Build.0 = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|ARM.Build.0 = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|arm64.ActiveCfg = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|arm64.Build.0 = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|x64.ActiveCfg = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|x64.Build.0 = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|x86.ActiveCfg = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Debug|x86.Build.0 = Debug|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|Any CPU.Build.0 = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|ARM.ActiveCfg = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|ARM.Build.0 = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|arm64.ActiveCfg = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|arm64.Build.0 = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|x64.ActiveCfg = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|x64.Build.0 = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|x86.ActiveCfg = Release|Any CPU
{D78B2286-F75B-4FE6-990B-84117E722CD4}.Release|x86.Build.0 = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|ARM.ActiveCfg = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|ARM.Build.0 = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|arm64.ActiveCfg = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|arm64.Build.0 = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|x64.ActiveCfg = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|x64.Build.0 = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|x86.ActiveCfg = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Debug|x86.Build.0 = Debug|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|Any CPU.Build.0 = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|ARM.ActiveCfg = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|ARM.Build.0 = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|arm64.ActiveCfg = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|arm64.Build.0 = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|x64.ActiveCfg = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|x64.Build.0 = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|x86.ActiveCfg = Release|Any CPU
{95007D84-20A1-4711-9CBC-DEE3B1798E74}.Release|x86.Build.0 = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|ARM.ActiveCfg = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|ARM.Build.0 = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|arm64.ActiveCfg = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|arm64.Build.0 = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|x64.Build.0 = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Debug|x86.Build.0 = Debug|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|Any CPU.Build.0 = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|ARM.ActiveCfg = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|ARM.Build.0 = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|arm64.ActiveCfg = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|arm64.Build.0 = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|x64.ActiveCfg = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|x64.Build.0 = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|x86.ActiveCfg = Release|Any CPU
{7955FADE-628E-4E41-B48B-350EFB5418E7}.Release|x86.Build.0 = Release|Any CPU
{21630DC1-A538-4198-A2C5-C38D9CDA0FB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21630DC1-A538-4198-A2C5-C38D9CDA0FB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21630DC1-A538-4198-A2C5-C38D9CDA0FB1}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -462,6 +571,11 @@ Global
{1AAC4923-A4E5-41D9-87FA-CFB028F802E5} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{B86CE874-B470-4294-BF98-21BB603E1F46} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{CB4B918C-3DBD-40AA-99F7-83EF033DB8A8} = {C4A7DBD6-6FB5-410A-9252-922C7909C82C}
{7AFF6421-B605-43F1-B849-D331E979B3B1} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{E5A8D8A2-6219-4632-84EC-8F8BF625A596} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{D78B2286-F75B-4FE6-990B-84117E722CD4} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{95007D84-20A1-4711-9CBC-DEE3B1798E74} = {162FE1A9-890A-4101-AFF8-54F6B1483882}
{7955FADE-628E-4E41-B48B-350EFB5418E7} = {C4A7DBD6-6FB5-410A-9252-922C7909C82C}
{21630DC1-A538-4198-A2C5-C38D9CDA0FB1} = {C4A7DBD6-6FB5-410A-9252-922C7909C82C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
2 changes: 1 addition & 1 deletion publish_win_arm64.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

msbuild /m /t:restore,cli\uupmediaconverter:publish,cli\uupdownload:publish /p:Platform=arm64 /p:RuntimeIdentifier=win-arm64 /p:PublishDir=%CD%\publish\artifacts\win-arm64\CLI /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release UUPMediaCreator.sln
msbuild /m /t:restore,cli\uupmediaconverter:publish,cli\uupdownload:publish,cli\computerhardwareids:publish /p:Platform=arm64 /p:RuntimeIdentifier=win-arm64 /p:PublishDir=%CD%\publish\artifacts\win-arm64\CLI /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release UUPMediaCreator.sln
18 changes: 18 additions & 0 deletions src/Applications/ComputerHardwareIds/ComputerHardwareIds.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows10.0.22621</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting\UnifiedUpdatePlatform.Services.WindowsUpdate.Targeting.csproj" />
</ItemGroup>

</Project>
59 changes: 59 additions & 0 deletions src/Applications/ComputerHardwareIds/ComputerInformationFetcher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Microsoft.Management.Infrastructure;
using Microsoft.Management.Infrastructure.Options;

namespace ComputerHardwareIds
{
public static class ComputerInformationFetcher
{
public static (string Manufacturer,
string Family,
string ProductName,
string SKUNumber,
string BIOSVendor,
string BaseboardManufacturer,
string BaseboardProduct,
ushort EnclosureType,
string BIOSVersion,
byte BIOSMajorRelease,
byte BIOSMinorRelease) FetchComputerInformation()
{
using DComSessionOptions dcomSessionOptions = new();
using CimSession cimSession = CimSession.Create("localhost", dcomSessionOptions);

CimInstance result = cimSession.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_BIOS").Single();

string BIOSVendor = (string)result.CimInstanceProperties["Manufacturer"].Value;
string BIOSVersionString = (string)result.CimInstanceProperties["SMBIOSBIOSVersion"].Value;
byte SystemBIOSMajorRelease = (byte)result.CimInstanceProperties["SystemBiosMajorVersion"].Value;
byte SystemBIOSMinorRelease = (byte)result.CimInstanceProperties["SystemBiosMinorVersion"].Value;

result = cimSession.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_ComputerSystem").Single();

string SystemManufacturer = (string)result.CimInstanceProperties["Manufacturer"].Value;
string SystemFamily = (string)result.CimInstanceProperties["SystemFamily"].Value;
string SystemProductName = (string)result.CimInstanceProperties["Model"].Value;
string SKUNumber = (string)result.CimInstanceProperties["SystemSKUNumber"].Value;

result = cimSession.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_SystemEnclosure").Single();

ushort SystemEnclosureorChassisType = ((ushort[])result.CimInstanceProperties["ChassisTypes"].Value)[0];

result = cimSession.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_BaseBoard").Single();

string BaseboardManufacturer = (string)result.CimInstanceProperties["Manufacturer"].Value;
string BaseboardProductName = (string)result.CimInstanceProperties["Product"].Value;

return (SystemManufacturer,
SystemFamily,
SystemProductName,
SKUNumber,
BIOSVendor,
BaseboardManufacturer,
BaseboardProductName,
SystemEnclosureorChassisType,
BIOSVersionString,
SystemBIOSMajorRelease,
SystemBIOSMinorRelease);
}
}
}
Loading
Loading