如何在Inno Setup 5.5.5或更早版本中检查安装程序是否在Windows 10上运行? [英] How to check if the setup is running on Windows 10 in Inno Setup 5.5.5 or older?

查看:173
本文介绍了如何在Inno Setup 5.5.5或更早版本中检查安装程序是否在Windows 10上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前GetWindowsVersionEx当前在Windows 10上返回版本6.3,因为当前可用的Inno Setup 5.5.5中尚未包括Windows 10兼容性所需的清单.

Currently GetWindowsVersionEx returns version 6.3 on Windows 10 because the necessary manifest for the Windows 10 compatibility is not yet included in the currently available Inno Setup 5.5.5.

在发布新版本的Inno Setup之前,是否有任何方法可以检查当前操作系统是否为Windows 10?

Is there any way to check if the current OS is Windows 10 until the new version of Inno Setup will be released?

我已经尝试检查kernel32.dll的文件版本,但是存在相同的问题.

I've already tried to check for the file version of kernel32.dll, but there is the same problem.

推荐答案

根据

According to this blog post, VerifyVersionInfo is now subject to the same manifest-based version shenanigans that previously plagued GetVersionEx (and the latter is now deprecated).

唯一的正确"答案是等待包含新清单清单值的Inno新版本.可能更节省时间的答案是使用资源黑客程序将此值添加到当前版本的Setup.e32SetupLdr.e32中,直到发布新版本为止.

The only "right" answer is to wait for a new version of Inno that includes the new manifest value. Possibly a more time-efficient answer is to use a resource hacker program to add this value to Setup.e32 and SetupLdr.e32 in your current version, until such time as the new version is released.

有一些黑客解决方案-我看到的一个例子是cmd /c ver然后解析输出-但我不会更详细地说明这一点,这不是一个好主意.坚持以上.

There are some hackier solutions -- one example that I've seen was to cmd /c ver and then parse the output -- but I'm not going to dignify that with more detail, it's not a good idea. Stick to the above.

这篇关于如何在Inno Setup 5.5.5或更早版本中检查安装程序是否在Windows 10上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆