Menu

#1303 Installer layout broken on some machines

3.0 Series
open
nobody
None
5
2024-01-29
2024-01-11
No

One of our customers reached out with a strange issue with our installer that I haven't been able to reproduce on another machine. The layout of the license screen is completely broken and usuable (the next button is not visible).

I'm quite new to NSIS so I'm unsure what other details to provide except that we're using the latest 3.09 release.

This is what the installer looks like regularly:
https://aleongmbh-my.sharepoint.com/:i:/g/personal/nikola_milekic_aleon_eu/EafkiSZg6hxOqvgbyDHgd3wBqeqOcKeHnc7aapwfo3wbpQ?e=5R0EQE

And how it looks on the client machine:
https://aleongmbh-my.sharepoint.com/:i:/g/personal/nikola_milekic_aleon_eu/ESbAJZOqGF5Jk1cCIAdHIH8BInSGfNUyy7D_jXI3PWl5pg?e=DGkvfv

Discussion

  • Anders

    Anders - 2024-01-12

    Windows version? DPI setting?

    Do you have ManifestDPIAware in your .nsi?

    Do you have any callbacks like MUI_PAGE_CUSTOMFUNCTION_SHOW?

    Does it happen with something simple like Examples/Modern UI/Basic.nsi ?

     
  • Nikola Milekic

    Nikola Milekic - 2024-01-26

    Apologies for the delay, I was waiting for our customer to get back to me. They're using Windows 10 22H2 (19045.3693). I'm not sure what their DPI is set to (at this time, I'm still waiting for them to get back to me). We're not using ManifestDPIAware.

    Here's a section of our nsi that displays the license page (DISPLAY_LICENSE is defined):

    !define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePage_Show 
    !define MUI_CUSTOMFUNCTION_ABORT     UserClickedCancel
    !insertmacro MUI_PAGE_WELCOME
    
    !ifdef DISPLAY_LICENSE
      !define MUI_PAGE_CUSTOMFUNCTION_SHOW LicensePageShow
      !insertmacro MUI_PAGE_LICENSE "license.rtf"
    !endif
    
    Page custom ShowExistingInstallationPage ValidateExistingInstallationPage
    
    !define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPagePre
    !insertmacro MUI_PAGE_DIRECTORY
    
    Page custom ShowShortcutsPage ValidateShortcutsPage
    
    !define MUI_PAGE_CUSTOMFUNCTION_SHOW InstallPageShow
    !insertmacro MUI_PAGE_INSTFILES
    
    !insertmacro MUI_PAGE_FINISH
    !insertmacro MUI_UNPAGE_CONFIRM
    !insertmacro MUI_UNPAGE_INSTFILES
    
     
  • Jason

    Jason - 2024-01-27

    Can you show us the code that is in 'Function LicensePageShow'? That would be the first thing to check.

     
  • Nikola Milekic

    Nikola Milekic - 2024-01-29

    Here's LicensePageShow. Thanks for your help!

    Function LicensePageShow
    
      StrCmp $SHOW_LICENSE "NO" ContinueInstallation 0
    
    ClearErrors
    
       StrCmp $CUSTOM_LICENSE "" ContinueInstallation LoadCustomLicense
    
       LoadCustomLicense:
    
         FileOpen $0 $CUSTOM_LICENSE r
         IfErrors ContinueInstallation
    
         System::Call 'kernel32::GetFileSize(i r0, i 0) i .r1'
         IntOp $1 $1 + 1
    
         System::Alloc $1
         Pop $2
    
         System::Call 'kernel32::ReadFile(i r0, i r2, i r1, *i .r3, i 0)'
         FileClose   $0
         FindWindow  $0 "#32770" "" $HWNDPARENT
         GetDlgItem  $0 $0 1000
         SendMessage $0 ${EM_SETLIMITTEXT} $1 0
         SendMessage $0 ${WM_SETTEXT} 0 $2
    
         System::Free $2
    
      ContinueInstallation:
    
    FunctionEnd
    
     

Log in to post a comment.

MongoDB Logo MongoDB