SplitScript reference / Module / fileVersion
Module.fileVersion
Method
Module.fileVersion() -> FileVersion!
Reads the file identity from a Windows PE version resource.
This is the version of the individual executable or library. Use productVersion() when a game identifies releases by product version. Missing resources, malformed images, and failed reads are errors.
Effects: reads process memory, requires an attached process
Runtime behavior: available while a process is attached, except in onDetach; synchronous
Examples
Select a known executable file version
let executable = await process.mainModule()
let version = executable.fileVersion() else return
if version == v"1.2.3.4" {
print("recognized file version 1.2.3.4")
}