FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Inno Setup System Information Detection Module (https://fileforums.com/showthread.php?t=106497)

Lord.Freddy 25-10-2024 01:21

Inno Setup System Information Module
 
1 Attachment(s)
ISSystemInfo
A complete system-information module for Inno Setup

Detect OS, CPU, GPU, RAM, display and power/battery info from inside your installer — one line each.

v0.9 • Inno Setup 5 (ANSI & Unicode) → 7 • Windows Vista / Server 2008 and later

─────────────────────────────────────────────

What is it?

ISSystemInfo is a single, self-contained [Code] module for Inno Setup that gives your installer real, live answers about the machine it's running on — without writing a line of WinAPI code yourself. Drop the .iss file in, #include it, and call what you need.

It's built for real installer logic, not just for display: gate a large download behind a minimum DirectX/GPU requirement, skip a lengthy install step while the machine is running on battery, pick the right redistributable based on detected CPU architecture, or just log the full hardware profile for support tickets — all from a single function call. No external DLLs, no dependencies to ship — pure Pascal Script.

What can it tell you?

Operating System
  • Full OS name & edition (e.g. "Windows 11 Pro for Workstations", "Windows Server 2025")
  • Build number, major/minor version, service pack, and display version (22H2, 24H2, …)
  • Can also evaluate a hypothetical target OS

Processor
  • CPU brand string and architecture (x64, ARM64, x86 under WOW64, …)
  • Logical core count, live CPU usage %, and true max clock speed

Graphics
  • Full multi-GPU enumeration: name, vendor, VRAM, DirectX DDI version, feature levels, and shader model
  • Automatically flags the primary adapter and whether it's integrated or not

Memory
  • Installed vs. usable vs. currently available RAM, plus live usage %

Display
  • Primary monitor resolution, colour depth, refresh rate, and DPI scaling

Power
  • AC power / battery presence and charge percentage

Compatibility

Recommended: Windows Vista / Server 2008 or later.

Windows XP / Server 2003 is also supported — just define CompatibleWithWinXP before including the module:
Code:

#define CompatibleWithWinXP
Only two functions rely on Vista-only APIs and are automatically disabled when this define is set: GetSystemTotalInstalledMemory and GetOSEditionName. Everything else works exactly the same on XP as it does on 11.

Quick examples
[CODE]
Code:

procedure InitializeWizard;
begin
  if GetPrimaryGPUSupportDirectXVersion < 11.0 then
    MsgBox('Your graphics card may not meet the minimum requirements.', mbInformation, MB_OK);

  if not IsSysPluggedIn then
    if MsgBox('This install may take a while and your device isn''t plugged in. Continue anyway?', mbConfirmation, MB_YESNO) = IDNO then
      Abort;
end;

Download
Attachment 41921 — full version history is in the changelog post.

Credits
Special thanks to Cesar82 for his help refining several parts of this module.

─────────────────────────────────────────────
Feedback, bug reports and feature requests are always welcome below.

Lord.Freddy 01-11-2025 10:58

Changelog
 
Code:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 0.9                                                    2026-9-23
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

╭── ★ New Features ★ ────────────────────────────────────────────────────────────────╮
● Support for Inno Setup v7
  ▪︎ All WinAPI handles now use the pointer-sized TSysHandle type, allowing the module
    to work correctly under Inno Setup 7 native handle model while remaining compatible
    with earlier Inno Setup versions, both ANSI and Unicode.
  ▪︎ ULONGLONG now safely selects TLargeInteger or a native 64-bit integer type
    depending on the compiler version in use.
  ▪︎ DxDiag execution now uses ExecWithNativeSysDir on Inno Setup 7, while older
    versions continue to use Exec with explicit filesystem redirection control.

● XML-based DirectX Diagnostics
  ▪︎ The DxDiag interaction has been completely overhauled.
  ▪︎ Instead of parsing a traditional plain-text report, the module now generates and
    reads an XML report through MSXML.
  ▪︎ The parsed XML document is now cached for the entire installer session, so repeated
    GPU/DirectX queries no longer re-launch DxDiag or re-parse the report from disk.
 ▪︎ XML loading is performed by GetDxDiagXMLReport, which caches a
  MSXML2.DOMDocument Variant and reuses it for the whole installer session.
 ▪︎ DxDiag is invoked with /whql:off /x <file>, and the output path is expanded
  from an Inno Setup constant before execution.
 ▪︎ MSXML initialization falls back from MSXML2.DOMDocument.6.0 to
  MSXML2.DOMDocument.3.0 and then to the default MSXML2.DOMDocument progID.
 ▪︎ Node extraction uses GetXmlNodeText, a safe XPath wrapper that returns an
  empty string instead of propagating COM exceptions.
 ▪︎ DirectX version helpers now expose explicit failure codes: -1 when the
  version node is missing and -2 when DxDiag / XML loading fails.
 ▪︎ New GetShaderModelFromFeatureLevel maps reported Direct3D feature levels to
  the highest supported HLSL shader model. The detected shader model is exposed
  per adapter through the new TGPUInfo.ShaderModel field.

● Power & Battery Status
  ▪︎ Added IsSysPluggedIn — returns True when the system is connected to AC power
    or currently charging.
  ▪︎ Added IsBatteryPresent — detects whether a physical battery is present.
  ▪︎ Added GetBatteryPercentage — returns the current battery charge percentage
    from 0–100%, or -1 when unknown or no battery is present.

● Extended Windows Edition Detection
  ▪︎ GetOSEditionName (renamed from GetOSEditionID) now recognizes a much wider
    set of Windows product types, including consumer N editions, Home Single Language,
    Pro for Workstations, Pro Education, Enterprise LTSC / Evaluation, IoT Enterprise,
    Hyper-V Server, Windows Team, Server Core / Semi-Annual Channel variants, and
    Enterprise for Virtual Desktops.

● Precise OS Version Identification
  ▪︎ GetOSName can now optionally accept custom Major / Minor / Build / IsWinServer
    parameters. This makes it suitable for validation based on specific requirements or
    for describing a version of Windows other than the one on which the installer is
    currently running.
  ▪︎ Additional detection now includes:
    ◦ Windows 2000
    ◦ Windows Server 2008 R2 with Service Pack 1
    ◦ Windows 7 with Service Pack 1
    ◦ Windows 8.1 with Update 1
    ◦ Windows Server 2025

● Graceful DxDiag Fallback Warning
  ▪︎ If the installed DirectX runtime is too old to produce XML output, the module now
    displays a one-time localized [CustomMessages] entry named DxDiagWarning
    and continues with limited functionality instead of failing silently.

● CPU Topology Reporting
  ▪︎ Added GetCPUPhysicalCore — counts real processor cores by parsing
    GetLogicalProcessorInformation relationship records.
    Structure offsets are calculated dynamically for 32-bit and 64-bit installers.
    Returns -1 when the API call fails or the returned buffer layout is invalid.
  ▪︎ GetCPUMaxClockSpeed no longer relies solely on the registry's boot-time
    measurement. It now queries WMI Win32_Processor.MaxClockSpeed through
    SWbemServices.Get to obtain the firmware/SMBIOS-declared maximum clock speed.
    If WMI is unavailable, the previous registry-based reading is used automatically.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Improvements ★ ────────────────────────────────────────────────────────────────╮
● Refactored Registry Access
  ▪︎ Added a central RegistryOpenKey helper that unifies registry-key opening and
    automatically handles 32/64-bit (WOW64) redirection.
  ▪︎ RegistryOpenKey also accepts KEY_FORCE_WOW32 / KEY_FORCE_WOW64
    sentinel bits in the root key parameter, allowing callers to request a specific
    registry view when automatic OS-type access is disabled.
  ▪︎ All RegQuery…Ex functions now accept an OSTypeAccess flag, removing a
    large amount of duplicated registry-access logic.
  ▪︎ Registry key handles are now closed inside try/finally blocks, preventing a
    handle leak if a read fails partway through.

● Direct DWORD Reading
  ▪︎ RegQueryDWordValueEx now reads directly into a DWORD variable instead of manually
    reassembling bytes from a buffer. This removes a potential endianness issue and
    simplifies the implementation.

● 32-bit & 64-bit Installer Compatibility
  ▪︎ All WinAPI handles now use the conditional pointer-sized TSysHandle type,
    ensuring correct operation on both x86 and x64 installers.
  ▪︎ The pointer-sized TSystemInfo fields lpMinimumApplicationAddress,
    lpMaximumApplicationAddress, and dwActiveProcessorMask now correctly
    use DWORD_PTR. This fixes address truncation on 64-bit installers.

● Sound Device Name Robustness
  ▪︎ Replaced the old CharsToString function with CharBufferToString.
    CharBufferToString uses the API call lstrcpyn for guaranteed null-termination
    handling on fixed-size Win32 character buffers. This applies to device names,
    GPU strings, and other fixed-size buffers.

● Cleaner GPU String & Cache Handling
  ▪︎ All device-interface strings — name, adapter, hardware ID, and registry key —
    are now processed through CharBufferToString.
  ▪︎ The GPU-cache initialization check, previously duplicated in all four
    GetPrimaryGPU* functions, is now handled by one shared helper:
    EnsureGPUsListInitialized
  ▪︎ GetGPUsInformation now resets its output array at the start of every call,
    preventing stale entries from a previous call from leaking into a reused array.
  ▪︎ VRAM detection from DxDiag is now wired directly into the main adapter enumeration
    loop.
  ▪︎ GetSpecificGPUInfoFromDxdiag now receives the VRAM parameter as in/out,
    so every adapter automatically benefits from the DxDiag fallback.

● Minor Polish
  ▪︎ Removed the unused CUF_InTeraBytes unit and its conversion multiplier.
  ▪︎ GetCPUArchitecture now returns "x64" for PROCESSOR_ARCHITECTURE_AMD64
    instead of the verbose "x64 (AMD or Intel)".
  ▪︎ KeepNumbers, previously embedded inside the old plain-text DxDiag parser,
    is now a standalone reusable and documented function.
  ▪︎ Nearly every constant, type, and function now carries a documentation comment
    describing its purpose, parameters, return values, and known caveats.
  ▪︎ StrToFloatEx now returns -1 immediately for empty input.
  ▪︎ FloatToStrEx now guards against an empty FloatToStr result.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Bug Fixes ★ ───────────────────────────────────────────────────────────────────╮
● ANSI Large-Integer Sign Bug
  (Root cause of the negative VRAM bug)
  ▪︎ LargeIntToExtended now takes its LowPart as a signed Integer and adds 2^32 back
    when the value is returned as negative. The previous implementation assumed
    the underlying Pascal Script engine always marshalled the 32-bit value as
    an unsigned Cardinal. This was the actual source of the ANSI-build-only
    negative VRAM and negative large-memory-value bug.

● Registry Key Access Rights
  ▪︎ Replaced KEY_QUERY_VALUE with the more comprehensive KEY_READ
    access mask, preventing rare "access denied" errors on certain registry paths.

● ANSI/Unicode String Length
  ▪︎ Registry string functions now correctly allocate their receive buffer using
    StringOfChar(#0, dwSize) instead of a manual "divide by 2 for Unicode"
    calculation. This eliminates potential string truncation in Unicode builds.

● GetSystemTotalInstalledMemory Cross-Version Fix
  ▪︎ The function now correctly handles the ULONGLONG type across Inno Setup versions
    instead of relying on a Currency-based conversion trick that only worked
    correctly on some compiler versions.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Renamed Functions — Breaking Changes ★ ────────────────────────────────────────╮
● There are NO backward-compatible aliases in v0.9.
  ▪︎ Update any calling code that references the old names before upgrading.
    ────────────────────────────────────────────────────────────────────────────
    Old name                            → New name
    ────────────────────────────────────────────────────────────────────────────
    GetDisplayHorizontalResolution      → GetPrimaryMonitorHorizontalResolution
    GetDisplayVerticalResolution        → GetPrimaryMonitorVerticalResolution
    GetDisplayResolutionBit              → GetPrimaryMonitorColorDepth
    GetDisplayMaxRefreshRate            → GetPrimaryMonitorRefreshRate
    GetDisplayHorizontalDPI              → GetPrimaryMonitorHorizontalDPI
    GetDisplayVerticalDPI                → GetPrimaryMonitorVerticalDPI
    GetOSEditionID                      → GetOSEditionName
    GetSystemTotalFreeMemory            → GetSystemAvailableMemory
    GetSoundDeviceName                  → GetSoundDeviceNames
    ────────────────────────────────────────────────────────────────────────────
╰─────────────────────────────────────────────────────────────────────────────────────╯

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 0.8                                                  2026-01-01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

╭── ★ Changes ★ ────────────────────────────────────────────────────────────────────╮
● Improved GPU detection
  ▪︎ The module now supports systems with multiple GPUs.

● Improved registry queries
  ▪︎ Registry values are now queried using the Windows API function RegQueryValueEx.

● Enhanced module performance and stability.

● Fixed various bugs.

● Important — ANSI GPU VRAM issue
  ▪︎ A bug identified in the ANSI build of Inno Setup, confirmed in
    Inno Setup 5.5.1.ee2, that could cause GPU VRAM to be reported
    as a negative value.
  ▪︎ Until a fix were available, the workaround is to use the Unicode build.
╰─────────────────────────────────────────────────────────────────────────────────────╯

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 0.7                                                  2025-11-01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

╭── ★ Changes ★ ─────────────────────────────────────────────────────────────────────╮
● Improved GUI example.

● Enhanced module performance and stability.

● Fixed various bugs.
╰─────────────────────────────────────────────────────────────────────────────────────╯

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 0.1 – 0.6                                          2023–2024-?-?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

● Changelog not available for these releases.


Dragonis40 01-11-2025 11:33

Good evening, unfortunally this "ISSystemInfo Module" doesn't detect dedicated VRAM. I have a laptop with both integrated and dedicated graphic cards.

Lord.Freddy 02-11-2025 10:01

1 Attachment(s)
Quote:

Originally Posted by Dragonis40 (Post 508822)
Good evening, unfortunally this "ISSystemInfo Module" doesn't detect dedicated VRAM. I have a laptop with both integrated and dedicated graphic cards.

Hi — I didn’t expect this to be necessary, but I’ve updated the code to detect both integrated and dedicated GPUs. Please try the new build and let me know the results.

Lord.Freddy 17-12-2025 08:11

Hi — The upcoming update is almost ready. I need to finalize a few details. If you have a system with multiple GPUs, please send the DxDiag log as a .txt file rather than .xml so I can verify the implementation. Thanks.

Lord.Freddy 31-12-2025 15:29

1 Attachment(s)
Quote:

Originally Posted by Lord.Freddy (Post 508820)
Changelog:

Code:

- Version 0.8 (2026-01-01)
  ▪︎ Improved GPU detection (Now module support system with multiple GPUs).
  ▪︎ Improved registry queries. The module now queries registry values using the Windows API function RegQueryValueEx.
  ▪︎ Enhanced module performance and stability.
  ▪︎ Fixed various bugs.
▪︎▪︎▪︎ Important: I have identified a bug in the ANSI build of Inno Setup (confirmed on Inno Setup 5.5.1.ee2) that can cause GPU VRAM value to be reported as negative. Until a fix is available, please use the Unicode build.


New Version!

Lord.Freddy 23-09-2026 13:53

Quote:

Originally Posted by Lord.Freddy (Post 508820)
Code:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version 0.9                                                    2026-9-23
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

╭── ★ New Features ★ ────────────────────────────────────────────────────────────────╮
● Support for Inno Setup v7
  ▪︎ All WinAPI handles now use the pointer-sized TSysHandle type, allowing the module
    to work correctly under Inno Setup 7 native handle model while remaining compatible
    with earlier Inno Setup versions, both ANSI and Unicode.
  ▪︎ ULONGLONG now safely selects TLargeInteger or a native 64-bit integer type
    depending on the compiler version in use.
  ▪︎ DxDiag execution now uses ExecWithNativeSysDir on Inno Setup 7, while older
    versions continue to use Exec with explicit filesystem redirection control.

● XML-based DirectX Diagnostics
  ▪︎ The DxDiag interaction has been completely overhauled.
  ▪︎ Instead of parsing a traditional plain-text report, the module now generates and
    reads an XML report through MSXML.
  ▪︎ The parsed XML document is now cached for the entire installer session, so repeated
    GPU/DirectX queries no longer re-launch DxDiag or re-parse the report from disk.
 ▪︎ XML loading is performed by GetDxDiagXMLReport, which caches a
  MSXML2.DOMDocument Variant and reuses it for the whole installer session.
 ▪︎ DxDiag is invoked with /whql:off /x <file>, and the output path is expanded
  from an Inno Setup constant before execution.
 ▪︎ MSXML initialization falls back from MSXML2.DOMDocument.6.0 to
  MSXML2.DOMDocument.3.0 and then to the default MSXML2.DOMDocument progID.
 ▪︎ Node extraction uses GetXmlNodeText, a safe XPath wrapper that returns an
  empty string instead of propagating COM exceptions.
 ▪︎ DirectX version helpers now expose explicit failure codes: -1 when the
  version node is missing and -2 when DxDiag / XML loading fails.
 ▪︎ New GetShaderModelFromFeatureLevel maps reported Direct3D feature levels to
  the highest supported HLSL shader model. The detected shader model is exposed
  per adapter through the new TGPUInfo.ShaderModel field.

● Power & Battery Status
  ▪︎ Added IsSysPluggedIn — returns True when the system is connected to AC power
    or currently charging.
  ▪︎ Added IsBatteryPresent — detects whether a physical battery is present.
  ▪︎ Added GetBatteryPercentage — returns the current battery charge percentage
    from 0–100%, or -1 when unknown or no battery is present.

● Extended Windows Edition Detection
  ▪︎ GetOSEditionName (renamed from GetOSEditionID) now recognizes a much wider
    set of Windows product types, including consumer N editions, Home Single Language,
    Pro for Workstations, Pro Education, Enterprise LTSC / Evaluation, IoT Enterprise,
    Hyper-V Server, Windows Team, Server Core / Semi-Annual Channel variants, and
    Enterprise for Virtual Desktops.

● Precise OS Version Identification
  ▪︎ GetOSName can now optionally accept custom Major / Minor / Build / IsWinServer
    parameters. This makes it suitable for validation based on specific requirements or
    for describing a version of Windows other than the one on which the installer is
    currently running.
  ▪︎ Additional detection now includes:
    ◦ Windows 2000
    ◦ Windows Server 2008 R2 with Service Pack 1
    ◦ Windows 7 with Service Pack 1
    ◦ Windows 8.1 with Update 1
    ◦ Windows Server 2025

● Graceful DxDiag Fallback Warning
  ▪︎ If the installed DirectX runtime is too old to produce XML output, the module now
    displays a one-time localized [CustomMessages] entry named DxDiagWarning
    and continues with limited functionality instead of failing silently.

● CPU Topology Reporting
  ▪︎ Added GetCPUPhysicalCore — counts real processor cores by parsing
    GetLogicalProcessorInformation relationship records.
    Structure offsets are calculated dynamically for 32-bit and 64-bit installers.
    Returns -1 when the API call fails or the returned buffer layout is invalid.
  ▪︎ GetCPUMaxClockSpeed no longer relies solely on the registry's boot-time
    measurement. It now queries WMI Win32_Processor.MaxClockSpeed through
    SWbemServices.Get to obtain the firmware/SMBIOS-declared maximum clock speed.
    If WMI is unavailable, the previous registry-based reading is used automatically.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Improvements ★ ────────────────────────────────────────────────────────────────╮
● Refactored Registry Access
  ▪︎ Added a central RegistryOpenKey helper that unifies registry-key opening and
    automatically handles 32/64-bit (WOW64) redirection.
  ▪︎ RegistryOpenKey also accepts KEY_FORCE_WOW32 / KEY_FORCE_WOW64
    sentinel bits in the root key parameter, allowing callers to request a specific
    registry view when automatic OS-type access is disabled.
  ▪︎ All RegQuery…Ex functions now accept an OSTypeAccess flag, removing a
    large amount of duplicated registry-access logic.
  ▪︎ Registry key handles are now closed inside try/finally blocks, preventing a
    handle leak if a read fails partway through.

● Direct DWORD Reading
  ▪︎ RegQueryDWordValueEx now reads directly into a DWORD variable instead of manually
    reassembling bytes from a buffer. This removes a potential endianness issue and
    simplifies the implementation.

● 32-bit & 64-bit Installer Compatibility
  ▪︎ All WinAPI handles now use the conditional pointer-sized TSysHandle type,
    ensuring correct operation on both x86 and x64 installers.
  ▪︎ The pointer-sized TSystemInfo fields lpMinimumApplicationAddress,
    lpMaximumApplicationAddress, and dwActiveProcessorMask now correctly
    use DWORD_PTR. This fixes address truncation on 64-bit installers.

● Sound Device Name Robustness
  ▪︎ Replaced the old CharsToString function with CharBufferToString.
    CharBufferToString uses the API call lstrcpyn for guaranteed null-termination
    handling on fixed-size Win32 character buffers. This applies to device names,
    GPU strings, and other fixed-size buffers.

● Cleaner GPU String & Cache Handling
  ▪︎ All device-interface strings — name, adapter, hardware ID, and registry key —
    are now processed through CharBufferToString.
  ▪︎ The GPU-cache initialization check, previously duplicated in all four
    GetPrimaryGPU* functions, is now handled by one shared helper:
    EnsureGPUsListInitialized
  ▪︎ GetGPUsInformation now resets its output array at the start of every call,
    preventing stale entries from a previous call from leaking into a reused array.
  ▪︎ VRAM detection from DxDiag is now wired directly into the main adapter enumeration
    loop.
  ▪︎ GetSpecificGPUInfoFromDxdiag now receives the VRAM parameter as in/out,
    so every adapter automatically benefits from the DxDiag fallback.

● Minor Polish
  ▪︎ Removed the unused CUF_InTeraBytes unit and its conversion multiplier.
  ▪︎ GetCPUArchitecture now returns "x64" for PROCESSOR_ARCHITECTURE_AMD64
    instead of the verbose "x64 (AMD or Intel)".
  ▪︎ KeepNumbers, previously embedded inside the old plain-text DxDiag parser,
    is now a standalone reusable and documented function.
  ▪︎ Nearly every constant, type, and function now carries a documentation comment
    describing its purpose, parameters, return values, and known caveats.
  ▪︎ StrToFloatEx now returns -1 immediately for empty input.
  ▪︎ FloatToStrEx now guards against an empty FloatToStr result.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Bug Fixes ★ ───────────────────────────────────────────────────────────────────╮
● ANSI Large-Integer Sign Bug
  (Root cause of the negative VRAM bug)
  ▪︎ LargeIntToExtended now takes its LowPart as a signed Integer and adds 2^32 back
    when the value is returned as negative. The previous implementation assumed
    the underlying Pascal Script engine always marshalled the 32-bit value as
    an unsigned Cardinal. This was the actual source of the ANSI-build-only
    negative VRAM and negative large-memory-value bug.

● Registry Key Access Rights
  ▪︎ Replaced KEY_QUERY_VALUE with the more comprehensive KEY_READ
    access mask, preventing rare "access denied" errors on certain registry paths.

● ANSI/Unicode String Length
  ▪︎ Registry string functions now correctly allocate their receive buffer using
    StringOfChar(#0, dwSize) instead of a manual "divide by 2 for Unicode"
    calculation. This eliminates potential string truncation in Unicode builds.

● GetSystemTotalInstalledMemory Cross-Version Fix
  ▪︎ The function now correctly handles the ULONGLONG type across Inno Setup versions
    instead of relying on a Currency-based conversion trick that only worked
    correctly on some compiler versions.
╰─────────────────────────────────────────────────────────────────────────────────────╯

╭── ★ Renamed Functions — Breaking Changes ★ ────────────────────────────────────────╮
● There are NO backward-compatible aliases in v0.9.
  ▪︎ Update any calling code that references the old names before upgrading.
    ────────────────────────────────────────────────────────────────────────────
    Old name                            → New name
    ────────────────────────────────────────────────────────────────────────────
    GetDisplayHorizontalResolution      → GetPrimaryMonitorHorizontalResolution
    GetDisplayVerticalResolution        → GetPrimaryMonitorVerticalResolution
    GetDisplayResolutionBit              → GetPrimaryMonitorColorDepth
    GetDisplayMaxRefreshRate            → GetPrimaryMonitorRefreshRate
    GetDisplayHorizontalDPI              → GetPrimaryMonitorHorizontalDPI
    GetDisplayVerticalDPI                → GetPrimaryMonitorVerticalDPI
    GetOSEditionID                      → GetOSEditionName
    GetSystemTotalFreeMemory            → GetSystemAvailableMemory
    GetSoundDeviceName                  → GetSoundDeviceNames
    ────────────────────────────────────────────────────────────────────────────
╰─────────────────────────────────────────────────────────────────────────────────────╯


ISSystemInfo v0.9 released https://fileforums.com/images/smilies/rolleyes.gif


All times are GMT -7. The time now is 05:56.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com