Skip to content

102.Operating System Information

› cmd⁠‿⁠⁠er edited this page Jun 19, 2026 · 8 revisions

102.1 Overview

The OsScan class provides a unified API for retrieving detailed information about the current operating system and runtime environment. It abstracts low-level platform queries into a single structured model that can be used for diagnostics, logging, system profiling, and environment inspection.


102.2 Supported Platforms

  • Windows
  • Linux
  • macOS (OSX)

Platform support depends on the availability of operating system information provided by the underlying operating system.


102.3 Creating an OS Scanner

To retrieve system information, create an instance of OsScan.

var scanner = new OsScan();

102.4 Retrieving OS Information

Use the OsExtract() method to obtain a complete snapshot of the current system environment.

var os = new OsScan().OsExtract();

Console.WriteLine(os.OSName);

102.5 Returned Properties

Operating System

Property Description
OSName Name of the operating system
OSVersion Version of the operating system
OSArchitecture Architecture of the OS (x64/x86/ARM)
Platform Underlying platform identifier

Runtime Information

Property Description
FrameworkDescription .NET runtime description
ProcessArchitecture Architecture of the current process
Is64BitOS Indicates whether OS is 64-bit
Is64BitProcess Indicates whether process is 64-bit
ProcessorCount Number of logical processors

System Environment

Property Description
MachineName Name of the machine
UserName Current logged-in user
UserDomainName Domain or workgroup name
UserProfile Path to user profile directory
SystemDirectory OS system directory
CurrentDirectory Current working directory
TempPath Temporary files directory

Memory Information

Property Description
WorkingSet Current process working set (memory usage)

102.6 Exceptions

This API does not throw any exceptions under normal conditions.

All values are retrieved using safe system calls with fallback handling where necessary.


102.7 Notes

  • Values are snapshot-based and may change during runtime.
  • On some restricted environments (e.g., containers or sandboxed systems), certain properties may return default or limited values.
  • This module is designed for diagnostics and environment awareness, not for system modification.

Firmware

NIC Information

Page Title
101.1 Overview
101.2 Supported Platforms
101.3 Creating a Scanner
101.4 Retrieving Network Interfaces
101.5 Returned Properties
101.6 Exceptions
101.7 Notes

OS Information

Page Title
102.1 Overview
102.2 Supported Platforms
102.3 Creating a Scanner
102.4 Retrieving OS Information
102.5 Returned Properties
102.6 Exceptions
102.7 Notes

Network

Connection String Generator

Page Title
201.1 Overview
201.2 SQL Server Connection String Builder
201.3 SQLite Connection String Builder
201.4 FTP Connection String Builder
201.5 Validation & Exceptions
201.6 Notes

Clone this wiki locally