Tosken
Posts: 15
Joined: Wed Oct 09, 2013 11:51 am

Possible bug when setting minimal screen resolution

Hi,

i want to check for a minimal screen resolution before installing our software.
I defined a resolution of 1920x1080 as minimum in the launch conditions.
The problem is that the installation always fails because of to low resolution even on machines with or above the desired resolution.

The same issue when i set a minimum of 1280x1024. It fails even on machines using Full-HD resolution.
I figured out that there was a similar forum topic a long time ago:
viewtopic.php?f=2&t=11603
Is there any solution for this problem or am i missing something?

Thanks and best regards
Sebastian
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Possible bug when setting minimal screen resolution

Hi Sebastian,

Indeed, we are aware of this problem, which is caused by an Windows Installer bug that appears only on Vista and Windows 7 machines.

However, below is described a workaround that you can use:
- create two public properties in the Install Parameters page (SCREEN_X and SCREEN_Y)
- go in the Custom Actions page and create two "Set installer property" custom actions anywhere under the "Wizard Dialogs Stage", with the following configurations:
  • Property: SCREEN_X
    Value: [ScreenX]

    Property: SCREEN_Y
    Value: [ScreenY]
- then, before the "Install Execute Stage -> Searches" action group restore these two values into the [ScreenX] and [ScreenY] private properties, also using two "Set installer property" custom actions:
  • Property: ScreenX
    Value: [SCREEN_X]

    Property: ScreenY
    Value: [SCREEN_Y]
- build and run the project

What happens is that Windows Installer is loosing the values of the [ScreenX] and [ScreenY] private properties when passing them from "Wizard Dialogs Stage" to "Install Execute Stage".

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Tosken
Posts: 15
Joined: Wed Oct 09, 2013 11:51 am

Re: Possible bug when setting minimal screen resolution

Thank you Eusebiu,

this solved my problem.

Best regards
Sebastian
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Possible bug when setting minimal screen resolution

You're welcome Sebastian. I'm glad the problem is solved.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Re: Possible bug when setting minimal screen resolution

Hello,

I'm experimenting a similar problem. I'm using the workaround explained here and it works when the installation is showing the UI. If I launch the installation in silent mode, then it fails. I have attached a demo project (AI 12.1), that reproduces the problem on a windows 7 machine.

Any help will be appreciated.

Thanks in advance,
Keneth
Attachments
ScreenIssue.aip
(17.84 KiB) Downloaded 639 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Possible bug when setting minimal screen resolution

Hi Keneth,

Can you set the following condition for the custom actions from the "Install Execute Stage" section and see if it works: UILevel = 5?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Re: Possible bug when setting minimal screen resolution

Hello Eusebui,

thanks for your answer. Unfortunately the conditions didn't change the behavior. The installation in silent mode still fails. I will send an email to support with some install logs. Maybe these help you finding the problem.

Please let me know if I can help you doing any other test

Regards,
Keneth
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Possible bug when setting minimal screen resolution

Hi Keneth,

As my colleague Eusebiu pointed, the ScreenX property and ScreenY properties are correctly set by Windows Installer during the Wizard Dialogs Stage, but when passing in the Install Execution Stage these properties are reset to a default value:
  • ScreenX = 1024
  • ScreenY = 768
Any resolution lower than this, will trigger the launch condition.
There are other users which faced this problem: In this case, you need to get the values of the Vertical and Horizontal Resolution when passing on the Install Execution Stage and set the ScreenX and ScreenY with correct values. For this, you can use a custom action. For example, you can use the predefined Run Windows PowerShell Script custom action and use the following script code:

Code: Select all

$MyScreenX = Get-WmiObject win32_videocontroller | select CurrentHorizontalResolution

$MyScreenY = Get-WmiObject win32_videocontroller | select CurrentVerticalResolution

AI_SetMsiProperty ScreenX $MyScreenX

AI_SetMsiProperty ScreenY $MyScreenY
Make sure you schedule this custom action in the Install Execution Stage before the Searches stage. You can also take a look on the Use PowerShell to Discover Multi-Monitor Information article which may be useful to you.

The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Attachments
Sample ScreenResolution Project.zip
(3.14 KiB) Downloaded 552 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Re: Possible bug when setting minimal screen resolution

Hello Dan,

thanks a lot. I can confirm this work around works.

Regards,
Keneth
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Possible bug when setting minimal screen resolution

You're always welcome Keneth,

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Medvezhonok
Posts: 6
Joined: Thu May 29, 2014 11:53 pm

Re: Possible bug when setting minimal screen resolution

This also happens in Windows 10.
The workaround also works in Windows 10.

Return to “Common Problems”