Skip to content

Commit

Permalink
Added a module for obtaining information about the BIOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
H0pex committed Jul 20, 2023
1 parent ad872d2 commit e3ae44d
Show file tree
Hide file tree
Showing 15 changed files with 699 additions and 83 deletions.
223 changes: 179 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Operation system information by Schizo

Provides the ability to quickly obtain detailed information about the Windows operating system, processor, installed SP, .NET Frameworks. It also allows you to get information about running system processes and manage them.
Provides the ability to quickly obtain detailed information about the Windows operating system, processor, installed SP, .NET Frameworks and BIOS. Also allows you to get information about running system processes and manage them.

# Adding to the project

#### .NET CLI
```CLI
> dotnet add package Hopex.OSI --version 23.0.1
> dotnet add package Hopex.OSI --version 23.0.3
```

#### Package Manager
```CLI
PM> NuGet\Install-Package Hopex.OSI -Version 23.0.1
PM> NuGet\Install-Package Hopex.OSI -Version 23.0.3
```

#### PackageReference
```XML
<PackageReference Include="Hopex.OSI" Version="23.0.1" />
<PackageReference Include="Hopex.OSI" Version="23.0.3" />
```

#### Paket CLI
```CLI
> paket add Hopex.OSI --version 23.0.1
> paket add Hopex.OSI --version 23.0.3
```

#### Script & Interactive
```CLI
> #r "nuget: Hopex.OSI, 23.0.1"
> #r "nuget: Hopex.OSI, 23.0.3"
```

#### Cake
```
// Install Hopex.OSI as a Cake Addin
#addin nuget:?package=Hopex.OSI&version=23.0.1
#addin nuget:?package=Hopex.OSI&version=23.0.3
// Install Hopex.OSI as a Cake Tool
#tool nuget:?package=Hopex.OSI&version=23.0.1
#tool nuget:?package=Hopex.OSI&version=23.0.3
```

# Opportunities
Expand Down Expand Up @@ -83,6 +83,41 @@ PM> NuGet\Install-Package Hopex.OSI -Version 23.0.1
| Getting user displays information (name, is it the main one, resolution) | :white_check_mark: |
| Getting connected drives information | :white_check_mark: |

### BIOS
| Option | Status |
| --- | ----------- |
| Bios characteristics | :white_check_mark: |
| BIOS version | :white_check_mark: |
| Build number | :white_check_mark: |
| Caption | :white_check_mark: |
| CodeSet | :white_check_mark: |
| Current language | :white_check_mark: |
| Description | :white_check_mark: |
| Embedded controller major version | :white_check_mark: |
| Embedded controller minor version | :white_check_mark: |
| Identification code | :white_check_mark: |
| Installable languages | :white_check_mark: |
| Install date | :white_check_mark: |
| Language edition | :white_check_mark: |
| List of languages | :white_check_mark: |
| Manufacturer | :white_check_mark: |
| Name | :white_check_mark: |
| Other target OS | :white_check_mark: |
| Primary BIOS | :white_check_mark: |
| Release date | :white_check_mark: |
| Serial number | :white_check_mark: |
| SMBIOS BIOS version | :white_check_mark: |
| SMBIOS major version | :white_check_mark: |
| SMBIOS minor version | :white_check_mark: |
| SMBIOS present | :white_check_mark: |
| Software element ID | :white_check_mark: |
| Software element state | :white_check_mark: |
| Status | :white_check_mark: |
| System BIOS major version | :white_check_mark: |
| System BIOS minor version | :white_check_mark: |
| Target operating system | :white_check_mark: |
| Version | :white_check_mark: |

# How to use

### Hidden command line
Expand Down Expand Up @@ -129,48 +164,148 @@ public void LainchEndCloseNotepad()
### Detailed information about the system

```C#
using Hopex.OSI.Information;
using Newtonsoft.Json;
using System;

public void SystemInformation()
{
OperationSystem OS = new OperationSystem();
Console.WriteLine(string.Join(
"\n",
$"Computer name: {OS.ComputerName}",
$"User name: {OS.UserName}",
$"OS name: {OS.Name}",
$"Core counts: {OS.CoreCounts}",
$"OS version: {OS.VersionString}",
$"Major version: {OS.MajorVersion}",
$"Minor version: {OS.MinorVersion}",
$"Build version: {OS.BuildVersion}",
$"Revision version: {OS.RevisionVersion}",
$"RAM size: {OS.RandomAccessMemorySize}",
$"WindowsVersion: {OS.WindowsVersion}",
$"WindowsBit: {OS.WindowsBit}",
$"Bist: [OS: {OS.Bits.OperationSystemBits}], [Sofware: {OS.Bits.ProgramBits}], [Processor: {OS.Bits.ProcessorBits}]",
$".NET Framework versions: {string.Join(", ", OS.DotNetFrameworkVersions.ToArray())}",
$"Screens: {OS.Screens.Select(screen => $"{screen.Name}{(screen.IsPrimary? " (main)" : "") } {screen.Size.Width}x{screen.Size.Height}").First()}",
$"Drives: {string.Join(", ", OS.Drives.Select((title, size) => $"{title}: {size}").ToArray())}"
));
Console.WriteLine(JsonConvert.SerializeObject(new SystemInformation(), Formatting.Indented));
Console.ReadKey();

/**
* Output for this:
*
* {
* "Screens": [
* {
* "Name": "DISPLAY1",
* "IsPrimary": true,
* "Size": "1920, 1200"
* },
* {
* "Name": "DISPLAY2",
* "IsPrimary": false,
* "Size": "1920, 1080"
* }
* ],
* "RandomAccessMemorySize": 8,
* "CoreCounts": "4",
* "UserName": "Schizo",
* "ComputerName": "DESKTOP-607U6SR",
* "Bits": {
* "ProgramBits": 1,
* "InformationBits": 2,
* "ProcessorBits": 2
* },
* "Edition": "Professional",
* "Name": "Windows 10",
* "ServicePack": "",
* "VersionString": "10.0.19045.0",
* "Version": {
* "Major": 10,
* "Minor": 0,
* "Build": 19045,
* "Revision": 0,
* "MajorRevision": 0,
* "MinorRevision": 0
* },
* "MajorVersion": 10,
* "MinorVersion": 0,
* "BuildVersion": 19045,
* "RevisionVersion": 0,
* "DotNetFrameworkVersions": [
* "2.0.50727.4927 Service Pack 2",
* "3.0.30729.4926 Service Pack 2",
* "3.5.30729.4926 Service Pack 1",
* "4.0.0.0",
* "4.8.04084"
* ],
* "WindowsBit": 64,
* "WindowsVersion": "Windows 10",
* "Drives": {
* "C": "218/239",
* "E": "232/1000",
* "J": "0/1000"
* }
* }
*/
```

### Detailed information about the BIOS

```C#
using Hopex.OSI.Information;
using Newtonsoft.Json;
using System;

public void BiosInformation()
{
Console.WriteLine(JsonConvert.SerializeObject(new BiosInformation(), Formatting.Indented));
Console.ReadKey();

/**
* Output for this:
*
* Computer name: HOPEX
* User name: schizo
* OS name: Windows 10
* Core counts: 4
* OS version: 10.0.22000.0
* Major version: 10
* Minor version: 0
* Build version: 22000
* Revision version: 0
* RAM size: 8
* WindowsVersion: Windows 10
* WindowsBit: 64
* Bist:[OS: Bit64], [Sofware: Bit32], [Processor: Bit64]
* .NET Framework versions: 2.0.50727.4927 Service Pack 2, 3.0.30729.4926 Service Pack 2, 3.5.30729.4926 Service Pack 1, 4.0.0.0, 4.8.04161
* Screens: DISPLAY1 (main) 1920x1200
* Drives: [C, 181 / 240]: 0, [G, 69 / 1000]: 1, [J, 69 / 1000]: 2
* {
* "BiosCharacteristics": [
* 7,
* 11,
* 12,
* 15,
* 16,
* 17,
* 19,
* 23,
* 24,
* 25,
* 26,
* 27,
* 28,
* 29,
* 32,
* 33,
* 40,
* 42,
* 43
* ],
* "BIOSVersion": [
* "ALASKA - 1072009",
* "V1.7",
* "American Megatrends - 4028D"
* ],
* "BuildNumber": null,
* "Caption": "V1.7",
* "CodeSet": null,
* "CurrentLanguage": null,
* "Description": null,
* "EmbeddedControllerMajorVersion": 255,
* "EmbeddedControllerMinorVersion": 255,
* "IdentificationCode": null,
* "InstallableLanguages": 0,
* "InstallDate": null,
* "LanguageEdition": null,
* "ListOfLanguages": [
* "en|US|iso8859-1"
* ],
* "Manufacturer": "American Megatrends Inc.",
* "Name": "V1.7",
* "OtherTargetOS": null,
* "PrimaryBIOS": true,
* "ReleaseDate": "20130930000000.000000+000",
* "SerialNumber": "To be filled by O.E.M.",
* "SMBIOSBIOSVersion": "V1.7",
* "SMBIOSMajorVersion": 2,
* "SMBIOSMinorVersion": 7,
* "SMBIOSPresent": true,
* "SoftwareElementID": "V1.7",
* "SoftwareElementState": 3,
* "Status": "OK",
* "SystemBiosMajorVersion": 4,
* "SystemBiosMinorVersion": 6,
* "TargetOperatingSystem": 0,
* "Version": "ALASKA - 1072009"
* }
*/
```

Expand Down
1 change: 1 addition & 0 deletions src/OSI/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.cr
.vs
docs
images
*.nupkg
Expand Down
Loading

0 comments on commit e3ae44d

Please sign in to comment.