5 min readModule: raggiesoft.raggiescriptF1: IDH_RSSC_NS_SYS (0x2007)
sys.* — Silicon, OS Kernel, UAC, Known Folders & Reboot Resume
The sys.* namespace exposes true un-shimmed Windows 11 hardware, silicon, kernel, display, accessibility, and known-folder queries without ever flipping global 32-bit/64-bit state variables.
CPU Silicon & Windows Kernel Version Queries
Unlike legacy installers that call GetVersionExW (which lies unless shimmed) or check PROCESSOR_ARCHITECTURE (which returns "AMD64" inside an x64 process emulated under ARM64 Prism!), sys.* calls ntdll.dll!RtlGetVersion and kernel32.dll!IsWow64Process2 directly:
Call
Signature
Return
Mutating?
Description
sys.arch
sys.arch()
string
Read-Only
Returns true physical host CPU silicon: "arm64" or "x64" (pierces WOW64 & Prism emulation!).
sys.compiledArch
sys.compiledArch()
string
Read-Only
Returns the compiled PE architecture of the running binary ("arm64" or "x64").
sys.isArm64
sys.isArm64()
bool
Read-Only
true when physical host silicon is native ARM64 (IMAGE_FILE_MACHINE_ARM64).
sys.isX64
sys.isX64()
bool
Read-Only
true when physical host silicon is x64 / AMD64 (IMAGE_FILE_MACHINE_AMD64).
sys.isEmulatedUnderPrism
sys.isEmulatedUnderPrism()
bool
Read-Only
true when an x64/x86 process is running under Windows 11 ARM64 Prism translation.
sys.osBuild
sys.osBuild()
int
Read-Only
Un-shimmed kernel build via RtlGetVersion (22000+ = Windows 11, 26100+ = 24H2).
sys.osVersion
sys.osVersion()
version
Read-Only
Un-shimmed 4-part SemVer OS version (e.g., v"10.0.26100.0").
sys.isWindows11
sys.isWindows11()
bool
Read-Only
true when sys.osBuild() >= 22000.
sys.isServer
sys.isServer()
bool
Read-Only
true on Windows Server SKUs (VER_NT_SERVER / VER_NT_DOMAIN_CONTROLLER).
sys.editionId
sys.editionId()
string
Read-Only
Reads Windows EditionID ("Professional", "Enterprise", "Education", etc.).
Privileges, UAC, Command-Line & Execution Mode
Call
Signature
Return
Mutating?
Description
sys.isAdmin
sys.isAdmin()
bool
Read-Only
true when running with effective Administrator token membership (CheckTokenMembership).
sys.uacEnabled
sys.uacEnabled()
bool
Read-Only
true when HKLM\...\Policies\System\EnableLUA != 0. Crucial before prompting UAC for Standard Users!
sys.canPromptUac
sys.canPromptUac()
bool
Read-Only
true when not silent and Windows can present an interactive elevation consent dialog.
sys.isSilent
sys.isSilent()
bool
Read-Only
true when invoked with /s, /S, /qn, /quiet, or --silent.
sys.isPassive
sys.isPassive()
bool
Read-Only
true when invoked with /passive or /qb (progress-only mode).
sys.isMaintenance
sys.isMaintenance()
bool
Read-Only
true when invoked in --repair or --uninstall maintenance mode.
sys.cmdLine
sys.cmdLine()
string
Read-Only
Returns the full raw Win32 command line (GetCommandLineW).
sys.cliArg
sys.cliArg(key: string, fallback?: string)
string
Read-Only
Reads a CLI KEY=VAL or KEY:VAL property, or fallback if omitted.
sys.hasSwitch
sys.hasSwitch(flag: string)
bool
Read-Only
Case-insensitive check for a CLI switch (sys.hasSwitch("--offline")).
Hardware, Display, Accessibility & Identity
Call
Signature
Return
Mutating?
Description
sys.ramMB
sys.ramMB()
int
Read-Only
Installed physical RAM in megabytes (GlobalMemoryStatusEx).
sys.cpuCores
sys.cpuCores()
int
Read-Only
Logical CPU processor count.
sys.freeDiskBytes
sys.freeDiskBytes(targetPath?: path)
int
Read-Only
Available free bytes on the volume backing targetPath (GetDiskFreeSpaceExW).
sys.freeDiskMB
sys.freeDiskMB(targetPath?: path)
int
Read-Only
Available free megabytes on the volume backing targetPath.