screen resolution test: false negative

Got a problem you cannot solve? Try here.
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

screen resolution test: false negative

Postby rosstrusler » Mon Jan 05, 2015 4:26 pm

My installation checks for a minimum 1024x768 resolution. Today a Win7 user with a 1920x1080 resolution failed this check. The attached PowerPoint file was sent by the user, showing screenshots of the installation error message and their current screen resolution.

What could be going wrong? How do I test/see what resolution InstallAware thinks the resolution is?
Attachments
COMB access.pptx
(2.43 MiB) Downloaded 389 times

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: screen resolution test: false negative

Postby bokkie » Mon Jan 05, 2015 5:26 pm

Very curious. My screen res is 2560x1440 and it works on my machine. I then created a new (basic) setup and added these statements to the MSIcode:

Set Variable FRED to NeitherTrueNorFalse

Get System Setting 800x600 Resolution into FRED
MessageBox: 800x600, $FRED$

Get System Setting 1024x768 Resolution into FRED
MessageBox: 1024x768, $FRED$

Get System Setting 1280x1024 Resolution into FRED
MessageBox: 1280x1024, $FRED$

Get System Setting 1600x1200 Resolution into FRED
MessageBox: 1600x1200, $FRED$

Get System Setting 1920x1440 Resolution into FRED
MessageBox: 1920x1440, $FRED$

In all cases, $FRED$ is true indicating the screen res is supported. If you add similar statements into a basic project, do you get the same true value for all resolutions? I guess on your machine it's okay as well but if you run it on the customer machine are there different values?

I found one possible link http://www.myitforum.com/articles/2/view.asp?id=4575 that might help you to call a DLL function to get the horizontal and vertical resolutions. Sorry, I can't think of much else at this late hour.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: screen resolution test: false negative

Postby rosstrusler » Mon Jan 05, 2015 10:09 pm

Looking at the MSICode the InstallAware GUI is adding a line:
Get System Setting 1024x768 Resolution into CHECKRES

This returns TRUE on our dev machines and all other users we've encountered for several years. But it returned FALSE on a user's system today, even though the user's current resolution is much higher.

The question is, what does this line actually do? i.e. what VCL, Win32 API or .NET call is being made? (I mention VCL because I believe InstallAware is built on some version of Delphi).

By checking these calls ourselves, this might tell us what InstallAware thinks the resolution is, and why.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: screen resolution test: false negative

Postby bokkie » Tue Jan 06, 2015 5:58 am

Good points. Unfortunately I don't know what internal methods are called to check the resolution. Perhaps we'll let Francesco answer that for us.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: screen resolution test: false negative

Postby FrancescoT » Tue Jan 06, 2015 2:30 pm

Dear Rosstrusler,

we simply use a call to "GetSystemMetrics" WIN API for such purpose http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx.

I can only suppose that may exist something wrong with that particular system, anyway I just tried to check what you reported with a simple script and the screen resolution is returned correctly using my WIN7 test machine.

Did you try to test using a dummy installer that just calls the "Get System Setting" command?
You could create a project from the "BLANK SETUP TEMPLATE" for this purpose.
This to verify if doesn't exist something else in your script causing the problem.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: screen resolution test: false negative

Postby rosstrusler » Tue Jan 06, 2015 3:08 pm

Which metric is InstallAware using in the GetSystemMetrics calls?

SM_CXSCREEN and SM_CYSCREEN
or
SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN

rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: screen resolution test: false negative

Postby rosstrusler » Wed Jan 07, 2015 11:34 am

I have found out what is going on: DPI virtualization.

The problem is that the InstallAware executable does not have the dpiAware flag set in its manifest (Vista and later), even if it installs applications that do have the dpiAware flag set.

When DPI virtualization is turned on and this flag is not set, Windows reports a smaller resolution to the installer via GetSystemMetrics.

DPI virtualization is increasingly the default. For instance, when text size is set to 150%, it is automatically turned on in Win8 and later.

The setting of the dpiAware flag should be made an option in InstallAware. That way dpiAware applications can have resolution properly tested by the installer. Meanwhile, old applications would test for the virtualized resolution size.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: screen resolution test: false negative

Postby FrancescoT » Wed Jan 07, 2015 1:29 pm

Dear Rosstrusler,

first of all thanks for sharing such information.

Honestly, because IA already supports High-DPI Installs (via API and not using a manifest) this should not impact the returned value.

Anyway, I want to verify this a little bit more and I'll tell you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 119 guests