RaggieScript v1.3.0
Browse Table of Contents (17 chapters)
Getting Started (2)
Language Reference (4)
Core Standard Library (3)
Windows, MSI SQL & Native FFI (3)
Wizard UI & Studio Sandboxes (3)
Diagnostics & Bytecode ISA (2)
Master Symbol Index
5 min read Module: raggiesoft.raggiescript F1: 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:

CallSignatureReturnMutating?Description
sys.archsys.arch()stringRead-OnlyReturns true physical host CPU silicon: "arm64" or "x64" (pierces WOW64 & Prism emulation!).
sys.compiledArchsys.compiledArch()stringRead-OnlyReturns the compiled PE architecture of the running binary ("arm64" or "x64").
sys.isArm64sys.isArm64()boolRead-Onlytrue when physical host silicon is native ARM64 (IMAGE_FILE_MACHINE_ARM64).
sys.isX64sys.isX64()boolRead-Onlytrue when physical host silicon is x64 / AMD64 (IMAGE_FILE_MACHINE_AMD64).
sys.isEmulatedUnderPrismsys.isEmulatedUnderPrism()boolRead-Onlytrue when an x64/x86 process is running under Windows 11 ARM64 Prism translation.
sys.osBuildsys.osBuild()intRead-OnlyUn-shimmed kernel build via RtlGetVersion (22000+ = Windows 11, 26100+ = 24H2).
sys.osVersionsys.osVersion()versionRead-OnlyUn-shimmed 4-part SemVer OS version (e.g., v"10.0.26100.0").
sys.isWindows11sys.isWindows11()boolRead-Onlytrue when sys.osBuild() >= 22000.
sys.isServersys.isServer()boolRead-Onlytrue on Windows Server SKUs (VER_NT_SERVER / VER_NT_DOMAIN_CONTROLLER).
sys.editionIdsys.editionId()stringRead-OnlyReads Windows EditionID ("Professional", "Enterprise", "Education", etc.).

Privileges, UAC, Command-Line & Execution Mode

CallSignatureReturnMutating?Description
sys.isAdminsys.isAdmin()boolRead-Onlytrue when running with effective Administrator token membership (CheckTokenMembership).
sys.uacEnabledsys.uacEnabled()boolRead-Onlytrue when HKLM\...\Policies\System\EnableLUA != 0. Crucial before prompting UAC for Standard Users!
sys.canPromptUacsys.canPromptUac()boolRead-Onlytrue when not silent and Windows can present an interactive elevation consent dialog.
sys.isSilentsys.isSilent()boolRead-Onlytrue when invoked with /s, /S, /qn, /quiet, or --silent.
sys.isPassivesys.isPassive()boolRead-Onlytrue when invoked with /passive or /qb (progress-only mode).
sys.isMaintenancesys.isMaintenance()boolRead-Onlytrue when invoked in --repair or --uninstall maintenance mode.
sys.cmdLinesys.cmdLine()stringRead-OnlyReturns the full raw Win32 command line (GetCommandLineW).
sys.cliArgsys.cliArg(key: string, fallback?: string)stringRead-OnlyReads a CLI KEY=VAL or KEY:VAL property, or fallback if omitted.
sys.hasSwitchsys.hasSwitch(flag: string)boolRead-OnlyCase-insensitive check for a CLI switch (sys.hasSwitch("--offline")).

Hardware, Display, Accessibility & Identity

CallSignatureReturnMutating?Description
sys.ramMBsys.ramMB()intRead-OnlyInstalled physical RAM in megabytes (GlobalMemoryStatusEx).
sys.cpuCoressys.cpuCores()intRead-OnlyLogical CPU processor count.
sys.freeDiskBytessys.freeDiskBytes(targetPath?: path)intRead-OnlyAvailable free bytes on the volume backing targetPath (GetDiskFreeSpaceExW).
sys.freeDiskMBsys.freeDiskMB(targetPath?: path)intRead-OnlyAvailable free megabytes on the volume backing targetPath.
sys.screenWidthsys.screenWidth()intRead-OnlyPrimary display width in physical pixels.
sys.screenHeightsys.screenHeight()intRead-OnlyPrimary display height in physical pixels.
sys.dpisys.dpi()intRead-OnlyPrimary monitor DPI (96 = 100%, 144 = 150%, 192 = 200%).
sys.isDarkModesys.isDarkMode()boolRead-Onlytrue when AppsUseLightTheme == 0 in Personalize.
sys.isHighContrastsys.isHighContrast()boolRead-Onlytrue when a Windows Contrast Theme (SPI_GETHIGHCONTRAST / HCF_HIGHCONTRASTON) is active!
sys.localesys.locale()stringRead-OnlyUser default BCP-47 locale tag (GetUserDefaultLocaleName, e.g., "en-US").
sys.computerNamesys.computerName()stringRead-OnlyLocal NetBIOS/DNS computer name.
sys.userNamesys.userName()stringRead-OnlyCurrent interactive account name.
sys.userSidsys.userSid()stringRead-OnlyString SID ("S-1-5-21-...") of the current process token (ConvertSidToStringSidW).
sys.machineGuidsys.machineGuid()stringRead-OnlyNative 64-bit HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid.
sys.newGuidsys.newGuid()stringRead-OnlyGenerates a fresh cryptographic {XXXXXXXX-XXXX-4XXX-...} UUIDv4 (BCryptGenRandom).
sys.uuid5sys.uuid5(name: string, namespaceGuid?: string)stringRead-OnlyGenerates a deterministic RFC 4122 SHA-1 UUIDv5 {GUID} (identical across x64 & ARM64 builds).
sys.foldersys.folder(knownName: string)pathRead-OnlyResolves known folders by name: "ProgramFiles", "ProgramFilesX86", "LocalAppData", "RoamingAppData", "ProgramData", "Desktop", "StartMenu", "Documents", "Fonts", "Windows", "System32", "Temp".

Multi-Reboot State Persistence (RunOnce)

CallSignatureReturnMutating?Description
sys.rebootLatchsys.rebootLatch(flag?: bool)boolWizard-SafeReads (or sets when flag is passed) the in-memory pending-reboot latch (EXIT_REBOOT_NEEDED = 3010).
sys.needsRebootsys.needsReboot()boolRead-OnlyReturns true if any prerequisite, MSI, or script step latched a pending OS restart.
sys.getResumeStatesys.getResumeState(id?: string)anyRead-OnlyLoads persisted JSON resume state map written before an OS restart (or null on fresh run).
sys.clearResumeStatesys.clearResumeState(id?: string)boolMutating (RSW701)Deletes persisted resume JSON and cleans up the RunOnce continuation entry.
sys.scheduleResumeAfterRebootsys.scheduleResumeAfterReboot(stateMap?: map, id?: string)boolMutating (RSW701)Persists stateMap and registers CurrentVersion\RunOnce to re-launch setup after sign-in.
sys.rebootAndResumesys.rebootAndResume(stateMap?: map, id?: string)pathMutating (RSW701)Persists stateMap, registers RunOnce, sets rebootLatch(true), and returns the state file path.

All 26 sys.* Read-Only Properties

Every path property returns a first-class path ready for / path joining (sys.programFiles / "RaggieSoft" / "Studio"):

PropertyTypeResolved Native Location
sys.programFilespathNative 64-bit C:\Program Files (never redirected to (x86)!)
sys.programFilesX86pathExplicit 32-bit C:\Program Files (x86)
sys.commonFilespathNative 64-bit C:\Program Files\Common Files
sys.commonFilesX86pathExplicit 32-bit C:\Program Files (x86)\Common Files
sys.localAppDatapathCurrent user %LOCALAPPDATA% (C:\Users\<Name>\AppData\Local)
sys.roamingAppDatapathCurrent user %APPDATA% (C:\Users\<Name>\AppData\Roaming)
sys.programDatapathShared machine C:\ProgramData
sys.desktopDirpathCurrent user Desktop folder
sys.commonDesktopDir / sys.publicDesktopDirpathAll-Users C:\Users\Public\Desktop
sys.startMenuDir / sys.startMenuProgramspathCurrent user Start Menu Programs folder
sys.commonStartMenuDir / sys.commonStartMenuProgramspathAll-Users Start Menu Programs folder
sys.documentsDirpathCurrent user Documents folder
sys.publicDocumentsDirpathAll-Users C:\Users\Public\Documents
sys.fontsDirpathSystem C:\Windows\Fonts
sys.windowsDirpathC:\Windows
sys.system32DirpathTrue 64-bit C:\Windows\System32
sys.sysWow64Dirpath32-bit C:\Windows\SysWOW64
sys.tempDirpathProcess %TEMP% folder
sys.exePathpathFull path to the running setup / packed .exe
sys.exeDirpathParent directory containing the running .exe
sys.supportDirpathExtracted _support\ helper directory (when bundled)
sys.windowsBuildintProperty alias for sys.osBuild()
sys.isSilentboolProperty alias for sys.isSilent()
Indexed API Calls & Symbols on This Page (33):