Skip to content
⌘ NSIS Forum Archive

How to restrict installer to particular OS

4 posts

gugaliashashank#

How to restrict installer to particular OS

Hi All

If i want to restrict the installer to get installed only to particular OS say windows XP how can i do that

So that i ll not be able to install the application to any other OS except windows XP
kichik#
Use WinVer.nsh to check the version and call Abort in .onInit if it doesn't match.
!include WinVer.nsh
Function .onInit
${Unless} ${IsWinXP}
MessageBox MB_OK "XP required"
Abort
${EndIf}
FunctionEnd
gugaliashashank#
thanks this works fine but one silly question if i want to allow installer to install on more then one OS what change do i need to make