Function FuncBrowseClick nsDialogs::SelectFileDialog /NOUNLOAD open "" "License files (*.lic)|*.lic" Pop $0 SendMessage $1 ${WM_SETTEXT} 0 STR:$0 FunctionEnd Function OnLicenseChange ${NSD_GetText} $1 $masterLicense ${If} $masterLicense == "" Call DisableNextButton ${Else} Call EnableNextButton ${EndIf} FunctionEnd Function FuncLicense ${If} $installUPGRADE == ${BST_CHECKED} ${AndIf} $installMaster != ${BST_CHECKED} Abort ${EndIf} ${If} $installMaster != ${BST_CHECKED} ${AndIf} $installDISTRIBUTED == ${BST_CHECKED} Abort ${EndIf} !insertmacro MUI_HEADER_TEXT "Configuration settings: License" "Please enter configuration settings." nsDialogs::Create /NOUNLOAD 1018 ${NSD_CreateLabel} 0 7u 38u 40u "License file:" ${NSD_CreateFileRequest} 43u 5u 200u 12u "" Pop $1 ${NSD_OnChange} $1 OnLicenseChange ${NSD_CreateBrowseButton} 250u 5u 50u 12u "Browse..." Pop $0 GetFunctionAddress $2 FuncBrowseClick nsDialogs::OnClick /NOUNLOAD $0 $2 ${NSD_SetFocus} $1 Call DisableNextButton nsDialogs::Show FunctionEnd Function FuncLicenseLeave ${NSD_GetText} $1 $masterLicense IfFileExists $masterLicense +3 0 MessageBox MB_OK|MB_ICONSTOP "Unable to find or read file $\"$masterLicense$\"." Abort FunctionEnd .