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 Creating an OS Scanner

To retrieve system information, create an instance of OsScan.

var scanner = new OsScan();

Retrieving OS Information Use the OsExtract() method to obtain a complete snapshot of the current system environment. var os = new OsScan().OsExtract(); Example Usage var os = new OsScan().OsExtract(); Console.WriteLine($""" {os.OSName} {os.OSVersion} {os.OSArchitecture} {os.ProcessArchitecture} {os.MachineName} {os.UserName} {os.UserDomainName} {os.FrameworkDescription} {os.Platform} {os.ProcessorCount} {os.Is64BitOS} {os.Is64BitProcess} {os.SystemDirectory} {os.CurrentDirectory} {os.UserProfile} {os.TempPath} {os.WorkingSet} """); Returned Properties Operating System PropertyDescriptionOSNameName of the operating systemOSVersionVersion of the operating systemOSArchitectureArchitecture of the OS (x64/x86/ARM)PlatformUnderlying platform identifier Runtime Information PropertyDescriptionFrameworkDescription.NET runtime descriptionProcessArchitectureArchitecture of the current processIs64BitOSIndicates whether OS is 64-bitIs64BitProcessIndicates whether process is 64-bitProcessorCountNumber of logical processors System Environment PropertyDescriptionMachineNameName of the machineUserNameCurrent logged-in userUserDomainNameDomain or workgroup nameUserProfilePath to user profile directorySystemDirectoryOS system directoryCurrentDirectoryCurrent working directoryTempPathTemporary files directory Memory Information PropertyDescriptionWorkingSetCurrent process working set (memory usage) Exceptions This API does not throw any exceptions under normal conditions. All values are retrieved using safe system calls with fallback handling where necessary. 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