Execute different command in Inno Setup Run section based on Windows version

后端 未结 1 1628
眼角桃花
眼角桃花 2021-01-15 09:54

I need to know if the Windows is XP, 7, 8, 2003, 2008 or 2012, because depends on version I will run a specific command.

I tried to install IIS in Windows 2008, but

相关标签:
1条回答
  • 2021-01-15 10:36

    Use the MinVersion and OnlyBelowVersion parameters in the [Run] section:

    [Run]
    ; for Windows 2012 and newer:
    Filename: pkgmgr; Parameters: "/iu:..."; MinVersion: 6.2
    ; for older versions (Windows 2008)
    Filename: pkgmgr; Parameters: "/iu:..."; OnlyBelowVersion: 6.2
    

    Learn the Windows version numbers.

    0 讨论(0)
提交回复
热议问题