SplitScript reference / Module / versionInfo

Module.versionInfo

Method

Module.versionInfo() -> ModuleVersionInfo!

Reads both fixed numeric versions from a Windows PE version resource.

The parser validates the DOS and PE headers, follows the bounded resource-directory hierarchy, and verifies VS_FIXEDFILEINFO before returning the file and product components. Missing resources, malformed images, and failed memory reads are ordinary errors. Use this method when both identities are needed so the resource is traversed only once.

Effects: reads process memory, requires an attached process

Runtime behavior: available while a process is attached, except in onDetach; synchronous

Examples

Inspect both identities

let executable = await process.mainModule()
let versions = executable.versionInfo() else return
print(`file {versions.file}, product {versions.product}`)