Announcement

Collapse
No announcement yet.

NSIS on HiDPI displays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Okay, from now on.

    `System::Call 'SHCORE::GetProcessDpiAwareness(p0,*i0r1)'` is pretty good too for detecting the process, and `System::Call 'USER32::SetProcessDPIAware()i.r0'` for starting said process. I agree, since 7 and Vista can get the DPI via the plugin, it's a gamechanger.

    Comment


    • #62
      Sorry to be hogging attention with this issue. Two weeks on it is still the same on Windows 11. It is sort of my problem. I'd let it alone, it not being crucial to my existence. It just can't be right though.

      C:\Gallery\bin\uninst.exe always runs at 96 dpi. Always.

      C:\Users\RG\AppData\Local\Gallery\bin\uninst.exe works.
      C:\Gallery\un\uninst.exe works.
      C:\Galleria\bin\uninst.exe works.

      All other OSes work with C:\Gallery\bin\uninst.exe.

      What's going on? Caching could be the cause, as Anders suggested.

      Is there a test you can run, a way to empty the cache?

      Thanks, and again, I do apologize. I know this is nuts.

      Comment


      • #63
        Watching this thread from afar, my first thought would be, have you done a binary comparison (with a tool like Beyond Compare) on the C:\Gallery\bin\uninst.exe file to check that it really is exactly the same file as in the other locations? If the file differs somehow, there's more at play than just the file location.

        If you could take the working exe from C:\Galleria\bin\uninst.exe, move it to C:\Gallery\bin\ and suddenly its behavior changes, then it becomes more plausible that there's something special about that folder on Windows 11. Or at least, special about it on your system - you could try firing up a brand new Windows 11 virtual machine to test if it also happens on a brand new Windows 11 install.

        It probably shouldn't be installing in C:\Gallery anyway. How does it behave when installed in C:\Program Files\(company name)\Gallery\ ?

        Comment


        • #64
          Beyond Compare generates the following report:

          HTML Code:
          Version Compare
          Produced: 08/07/2022 17:45:34
             
          Left file: C:\Gallery\bin\uninst.exe     Right file: C:\Gallery\un\uninst.exe  
          19 same item(s)  
          2 important difference item(s)
          I don't believe they are very important.

          Differences:

          Data: 5,484,709 bytes (left)
          Data: 5,484,709 bytes (right)

          Unknown (Compiled): 08/07/2022 17:28:02 (left)
          Unknown (Compiled): 08/07/2022 03:21:04 (right)

          It cannot be the uninst.exe binary.

          I tried renaming the folder containing 'uninst.exe' from 'bin' to 'un', and it worked as long as it pointed to 'C:\Gallery\un' in the registry.

          Vice versa: renaming the folder 'un' to 'bin, ditto in the registry, it ran at 96 dpi again.

          It's the file-name-folder-name combo.

          Installing to 'C:\Program Files\RG\Gallery', where the uninstaller file is 'C:\Program Files\RG\Gallery\bin\uninst.exe', tosses up nothing that unusual. 'uninst.exe' executes at 144 dpi. It works.

          'C:\Gallery\bin\uninst.exe' is dpi-unaware.

          I have been looking at this line of code:

          PHP Code:
          !define TEMP $INSTDIR\bin Temporary location of encrypted archives 
          changed it to:

          PHP Code:
          !define TEMPUS $INSTDIR\bin Temporary location of encrypted archives 
          Result: 96 dpi.

          I don't want to divert - even further divert - this thread, an edifying the thread, from HiDPI in NSIS. If I discover that it is an actual NSIS bug, which I seriously doubt it is, I will post in a new thread. Thanks everyone.

          Comment

          Working...
          X