Skip to content
Hopex-DevelopmentPublic

About

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.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages