Can anyone help me to combine the following two custom.nsh files. Separately Both codes work fine for me for registering dll, ocx, and font support . As I don't understand how to code custom.nsh , I can not combine both codes to support font and dll or ocx file together. Can anyone combine it in One custom.nsh file for me please.
Font Support
${SegmentFile} !include WinMessages.nsh ${SegmentPrePrimary} ;Load app ttf Fonts FindFirst $0 $1 "$EXEDIR\App\Fonts\*.ttf" ${DoWhile} $1 != "" System::Call "gdi32::AddFontResource(t'$EXEDIR\App\Fonts\$1')i .r2" FindNext $0 $1 ${Loop} FindClose $0 ;Let all running apps know SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=1 !macroend ${SegmentPostPrimary} ;Remove app ttf Fonts FindFirst $0 $1 "$EXEDIR\App\Fonts\*.ttf" ${DoWhile} $1 != "" System::Call "gdi32::RemoveFontResource(t'$EXEDIR\App\Fonts\$1')i .r2" FindNext $0 $1 ${Loop} FindClose $0 ;Let all running apps know SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=1 !macroend
DLL or OCX file Registering
${SegmentFile} ${SegmentPrePrimary} ExecWait 'RegSvr32 /S "$AppDirectory\Subtitler\COMCTL32.OCX"' ExecWait 'RegSvr32 /S "$AppDirectory\Subtitler\divx.dll"' !macroend ${SegmentPostPrimary} ExecWait 'RegSvr32 /U /S "$AppDirectory\Subtitler\COMCTL32.OCX"' ExecWait 'RegSvr32 /U /S "$AppDirectory\Subtitler\divx.dll"' !macroend