Hopex.OSI 23.0.3

dotnet add package Hopex.OSI --version 23.0.3
NuGet\Install-Package Hopex.OSI -Version 23.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hopex.OSI" Version="23.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hopex.OSI --version 23.0.3
#r "nuget: Hopex.OSI, 23.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Hopex.OSI as a Cake Addin
#addin nuget:?package=Hopex.OSI&version=23.0.3

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

Operation system information by Schizo

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
> dotnet add package Hopex.OSI --version 23.0.3
Package Manager
PM> NuGet\Install-Package Hopex.OSI -Version 23.0.3
PackageReference
<PackageReference Include="Hopex.OSI" Version="23.0.3" />
Paket CLI
> paket add Hopex.OSI --version 23.0.3
Script & Interactive
> #r "nuget: Hopex.OSI, 23.0.3"
Cake
// Install Hopex.OSI as a Cake Addin
#addin nuget:?package=Hopex.OSI&version=23.0.3

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

Opportunities

Hidden command line

Option Status
Executing any commands

Process manager

Option Status
Search for a running process by its name
Asynchronous verification of the existence of a process(s) by its name
Getting a list of all processes
Getting а process ID by its name
Getting а process ID by its name
Getting а process executable path by its name
Getting а process executable path by its ID
Closing a process by its name

Opertion sysytem

Option Status
Getting user name
Getting computer name
Getting computer RAM size
Getting user name
Getting a number of processor cores
Getting edition of the OS
Getting name of the OS
Getting edition of the OS
Getting version OS
Getting major version of the OS
Getting minor version of the OS
Getting build version of the OS
Getting revision version of the OS
Getting installed .NET Framework versions
Getting service pack information if exists
Getting the bitness of the OS (system, software, processor)
Getting the name of the OS release
Getting user displays information (name, is it the main one, resolution)
Getting connected drives information

BIOS

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

How to use

Hidden command line

public void NotepadLaunch()
{
    // Create a hidden command line instances and process managers instances
    HiddenCommandLine commandLine = new HiddenCommandLine();

    // Run the notepad application
    commandLine.Exec("notepad");
}

Process manager

public void LainchEndCloseNotepad()
{
    /**
     * Let's launch notepad, check if it is running,
     * and close it using the hidden command line and process manager.
     */
     
    // Create a hidden command line instances and process managers instances
    HiddenCommandLine commandLine = new HiddenCommandLine();
    ProcessManager processManager = new ProcessManager();

    // The second parameter is set to false (by default true), so as not to wait for the process to complete.
    commandLine.Exec("notepad", false);
    
    // Let's wait one second until notepad is displayed (locking main ui thread is a bad practice).
    System.Threading.Thread.Sleep(1000);
    
    // Now, if notepad is running, we will close all its instances
    bool notepadIsRunning = await processManager.AsyncProcessExistsByName("notepad");
    if (notepadIsRunning)
        processManager.KillProcessByName("notepad");
    Console.WriteLine(notepadIsRunning ? "Exists" : "Not exists");
}

Detailed information about the system

using Hopex.OSI.Information;
using Newtonsoft.Json;
using System;

public void SystemInformation()
{
    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

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:
     *
     * {
     *     "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"
     * }
     */

License

MIT License

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
23.0.3 167 7/20/2023
23.0.2 131 6/9/2023
23.0.1 122 6/9/2023

Added a module for obtaining information about the BIOS.