Hopex.OSI
23.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Hopex.OSI --version 23.0.2
NuGet\Install-Package Hopex.OSI -Version 23.0.2
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.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hopex.OSI --version 23.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hopex.OSI, 23.0.2"
#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.2 // Install Hopex.OSI as a Cake Tool #tool nuget:?package=Hopex.OSI&version=23.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.
Adding to the project
.NET CLI
> dotnet add package Hopex.OSI --version 23.0.2
Package Manager
PM> NuGet\Install-Package Hopex.OSI -Version 23.0.2
PackageReference
<PackageReference Include="Hopex.OSI" Version="23.0.2" />
Paket CLI
> paket add Hopex.OSI --version 23.0.2
Script & Interactive
> #r "nuget: Hopex.OSI, 23.0.2"
Cake
// Install Hopex.OSI as a Cake Addin
#addin nuget:?package=Hopex.OSI&version=23.0.2
// Install Hopex.OSI as a Cake Tool
#tool nuget:?package=Hopex.OSI&version=23.0.2
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 | ✅ |
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
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())}"
));
/**
* 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
*/
License
MIT License
Product | Versions 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.
-
.NETFramework 4.7.2
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.