1

I have a custom action that is called in my MSI installer which is created by Wix Toolset. The custom action may display a simple windows form if certain conditions are not met.

I have noticed that the form does not display nicely on high-DPI monitors and I have tried to make the form DpiAware by adding an app.manifest file (and uncommenting the dpiAware part) to the CustomAction project but it doesn't seem to have any affect and the form still appears blurry on high-dpi screens.

Is there any way to show a DpiAware form as part of a custom action in a Wix MSI installer?

tjsmith
  • 729
  • 7
  • 21
  • 1
    Maybe you can call [SetProcessDPIAware](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633543%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396) before the first form is shown. – Reza Aghaei Feb 24 '18 at 09:33
  • thanks so much, SetProcessDPIAware did the trick! – tjsmith Feb 24 '18 at 09:45
  • Please be very careful showing GUI from custom actions - it is generally not the right thing to do. What are you inputting here? Is it elevated stuff (`HKLM`, `ProgramFiles settings`, or can it be done from your application instead (`HKCU settings`, `user-profile files`, etc...)? Showing GUI from a custom action in deferred mode (elevated rights) is always wrong - no GUI should be shown at all from the `InstallExecuteSequence` of an MSI. The `InstallUISequence` should have all the GUI elements - and you should use normal MSI GUI if possible. – Stein Åsmul Feb 24 '18 at 10:26

0 Answers0