You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Inno Setup中VersionInfoVersion指令值无效编译报错咨询

Fixing "Invalid value for [Setup] section directive 'VersionInfoVersion'" in Inno Setup

Hey, let's break down why you're hitting this error and how to fix it quickly:

The core issue here is that VersionInfoVersion strictly follows Windows file version number rules—each of the four dot-separated segments in the version string must be a 16-bit unsigned integer, meaning the maximum value for any segment is 65535. Your version 0.4.0.201801182 has a final segment (201801182) that's way larger than this limit, which triggers the "invalid value" error during compilation.

Here are a few practical solutions to resolve this:

  • Shorten the problematic segment
    That final segment looks like a date stamp (2018-01-18 with an extra digit). You can simplify it to a value under 65535, like using 1801 (month + day) to get 0.4.0.1801, or 18 (day of the year) for 0.4.0.18. Pick a format that still makes sense for your version tracking.

  • Restructure your version string
    If you want to keep more date context without exceeding the limit, split the date across multiple segments. For example:

    VersionInfoVersion=0.4.2018.118
    

    Here, each segment (0, 4, 2018, 118) is well under 65535, and you still retain the year (2018) and day of year (118) for reference.

  • Use VersionInfoTextVersion for full display
    If you need the full long version string to show up in the installer's file properties, separate the compliant version for compilation from the display version:

    [Setup]
    VersionInfoVersion=0.4.0.1801  ; Compliant with Windows limits
    VersionInfoTextVersion=0.4.0.201801182  ; Full version shown to users
    

    This way, the compiler accepts the valid VersionInfoVersion, and users still see your complete version string when checking the installer's details.

Just double-check that every segment in your VersionInfoVersion value is ≤ 65535, and your compilation should run without issues.

内容的提问来源于stack exchange,提问作者user707779

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:33:30