We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Feature->Install-time conditions only support 256 characters

Hi,
I have requirement to display the feature only for the desktop operating systems(i.e not for the Server operating systems). So, I wanted to put the following condition in Feature->Install-time conditions->Installed if:

Code: Select all

((VersionNT = 501) OR (VersionNT = 600 AND MsiNTProductType = 1) OR (VersionNT = 601 AND MsiNTProductType = 1) OR (VersionNT = 602 AND MsiNTProductType = 1) OR (VersionNT = 603 AND MsiNTProductType = 1) OR (VersionNT64 = 501) OR (VersionNT64 = 600 AND MsiNTProductType = 1) OR (VersionNT64 = 601 AND MsiNTProductType = 1) OR (VersionNT64 = 602 AND MsiNTProductType = 1) OR (VersionNT64 = 603 AND MsiNTProductType = 1))
But this field only takes 255 characters.
Can I directly change this in the aip file

Code: Select all

<ROW Feature_="TSP" Level="1" Condition="((VersionNT = 501) OR (VersionNT = 600 AND MsiNTProductType = 1) OR (VersionNT = 601 AND MsiNTProductType = 1) OR (VersionNT = 602 AND MsiNTProductType = 1) OR (VersionNT = 603 AND MsiNTProductType = 1) OR (VersionNT64 = 501) OR (VersionNT64 = 600 AND MsiNTProductType = 1) OR (VersionNT64 = 601 AND MsiNTProductType = 1) OR (VersionNT64 = 602 AND MsiNTProductType = 1) OR (VersionNT64 = 603 AND MsiNTProductType = 1))"/>
Regards,
Rohan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Feature->Install-time conditions only support 256 charac

Hi Rohan,

The condition that you want to use can be simplified to the one written below:
  • (VersionNT=501) OR (VersionNT >=600 AND MsiNTProductType = 1)
The [VersionNT] property is set on the 64-bit machines too, so you do not need to also use the VersionNT64 property.

If you want to use the condition that you mentioned, you can create two "Set installer property" custom actions after the "Searches" action group which set two properties if the two halves of your condition are true:

Code: Select all

[b]Property: PROP1
Value: 1
Condition: (VersionNT = 501) OR (VersionNT = 600 AND MsiNTProductType = 1) OR (VersionNT = 601 AND MsiNTProductType = 1) OR (VersionNT = 602 AND MsiNTProductType = 1) OR (VersionNT = 603 AND MsiNTProductType = 1)

Property: PROP2
Value: 1
Condition: (VersionNT64 = 501) OR (VersionNT64 = 600 AND MsiNTProductType = 1) OR (VersionNT64 = 601 AND MsiNTProductType = 1) OR (VersionNT64 = 602 AND MsiNTProductType = 1) OR (VersionNT64 = 603 AND MsiNTProductType = 1)[/b]
Then you can use those properties to set the condition for your feature: PROP1 OR PROP2

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Feature->Install-time conditions only support 256 charac

The condition that you want to use can be simplified to the one written below:
(VersionNT=501) OR (VersionNT >=600 AND MsiNTProductType = 1)
I think the above does not include Windows 2003 Server, so I think following is the correct one

Code: Select all

(VersionNT=501) OR (VersionNT = 502) or (VersionNT >=600 AND MsiNTProductType = 1)
Please correct if I am wrong.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Feature->Install-time conditions only support 256 charac

Hi Rohan,

Indeed, I did not include "Windows Server 2003" in the condition because I thought that you don't want any server to be included. However, the condition that you mentioned in the previous post is correct.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Feature->Install-time conditions only support 256 charac

Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Feature->Install-time conditions only support 256 charac

My pleasure.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”