如果 Windows 的当前版本不受支持,我该如何显示自己的消息然后退出安装程序?

How can I show my own message and then exit setup if the current version of Windows is not supported?

我必须检查 Windows 版本是否不低于 6.1,即 Windows 7. 如果它较低,我需要显示我自己的消息,然后退出设置。 如果我在 [Setup] 部分写这个:

[Setup]
MinVersion=6.1

显示的消息是标准消息。 如何显示我自己的消息然后退出设置?

[Messages] section中设置WindowsVersionNotSupported:

[Messages]
WindowsVersionNotSupported=You are using an ancient version of Windows.