ReadRegStr $0 HKLM "Software\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
StrCpy $R0 $0 1
IntCmp $R0 6 0 less more
StrCpy $R1 $0 1 -1
IntCmp $R1 2 0 less more
Return
less:
Return
more:
MessageBox MB_OK "该系统版本不支持${PRODUCT_NAME}"
StrCpy $R0 $0 1
IntCmp $R0 6 0 less more
StrCpy $R1 $0 1 -1
IntCmp $R1 2 0 less more
Return
less:
Return
more:
MessageBox MB_OK "该系统版本不支持${PRODUCT_NAME}"
Quit
6.2是win8版本, 6.3是win8.1版本.
最小版本是win8.
原来字符串也能被IntCmp所识别, 而且自动给变成INT..
本文介绍了一种使用ReadRegStr和IntCmp指令检测Windows版本的方法,并给出具体实现代码。文中提到,通过读取注册表中SoftwareMicrosoftWindowsNTCurrentVersion键的CurrentVersion值可以判断当前系统的版本号。
5466

被折叠的 条评论
为什么被折叠?



