在制作安装程序的时候,我们会经常遇到根据用户的不同选择而随后显示不同的安装信息采集页面。 其实很简单,在使用NSIS的时候发现了这么个方法,记下来防止自己忘记哈:
Code
; MUI 2 compatible ------
!include "MUI2.nsh"
!include "Registry.nsh"
!include "LogicLib.nsh"
!include "nsDialogs.nsh"
Page custom ShowAdminInfo LeaveAdminInfo
Function ShowAdminInfo
#test for display custom page in different condition
${If} $RadioButton_State_CustomPage == ${BST_CHECKED}
${Endif}
FunctionEnd
; MUI 2 compatible ------
!include "MUI2.nsh"
!include "Registry.nsh"
!include "LogicLib.nsh"
!include "nsDialogs.nsh"
Page custom ShowAdminInfo LeaveAdminInfo
Function ShowAdminInfo
#test for display custom page in different condition
${If} $RadioButton_State_CustomPage == ${BST_CHECKED}
${Endif}
FunctionEnd