name "NSISDemo"
outfile 'NSISDemo.exe'
Section "NSISDemo"
ReadRegStr $R0 HKLM SOFTWAREMicrosoftWindowsCurrentVersionUninstallTTPlayer "DisplayVersion"
IntCmp $R0 "5.0" is5 lessthan5 morethan5
is5:
DetailPrint "$R0 == 5.0"
Goto int
lessthan5:
DetailPrint "$R0 < 5.0"
Goto error2
morethan5:
DetailPrint "$R0 > 5.0"
Goto error1
int:
MessageBox MB_OK "你系统中现有版本为$R0,点击OK安装更新" IDOK
DetailPrint "安装版本为: $R0"
goto done
error1:
MessageBox MB_ICONSTOP|MB_OK "你系统中版本$R0高于更新版本" IDOK
error2:
MessageBox MB_ICONSTOP|MB_OK "你系统中版本$R0低于更新版本" IDOK
done:
SectionEnd
THE END
暂无评论内容