Мне нужно проверить версию Framework, версию ОС и привилегии администратора перед LaunchConditions. Моя версия ОС и условия администрирования работают как положено, но не в фреймворковой версии. NETFRAMEWORK35 не заполняется. Ниже мой код.
<PropertyRef Id="NETFRAMEWORK35" />
<UI>
<UIRef Id='...'/>
<Error Id="2001">Please uninstall older version of this product to continue.</Error>
<Error Id="2002">This application is only supported on Windows Server 2008(64 bit) or Windows 2003(32 or 64 bit).</Error>
<Error Id="2003">Microsoft .NET Framework Version 3.5 is missing. To download please visit $(var.FrameworkDownload)</Error>
<Error Id="2004">You need to be an administrator to install this product.</Error>
</UI>
<CustomAction Id="CurrentVersionDetected" Error="2001"/>
<CustomAction Id="WrongOSVersionDetected" Error="2002" />
<CustomAction Id="FrameworkMissing" Property="NETFRAMEWORK35" Error="2003" />
<CustomAction Id="IsNotAdministrator" Error="2004" />
<InstallExecuteSequence>
<Custom Action="IsNotAdministrator" After="FrameworkMissing">
<![CDATA[NOT(Installed OR Privileged)]]>
</Custom>
<Custom Action="FrameworkMissing" After="WrongOSVersionDetected">
**<![CDATA[NETFRAMEWORK35]]> //This is make sure it is getting fired, but not**
</Custom>
<Custom Action="WrongOSVersionDetected" After="FindRelatedProducts">
<![CDATA[NOT(Installed OR VersionNT = 601 OR (VersionNT = 600 AND VersionNT64))]]>
</Custom>
<Custom Action="CurrentVersionDetected" After="AppSearch">SELFFOUND</Custom>
</InstallExecuteSequence>
<InstallUISequence>
<Custom Action="IsNotAdministrator" After="FrameworkMissing">
<![CDATA[NOT(Installed OR Privileged)]]>
</Custom>
<Custom Action="FrameworkMissing" After="WrongOSVersionDetected">
**<![CDATA[NETFRAMEWORK35]]> //This is make sure it is getting fired, but not**
</Custom>
<Custom Action="WrongOSVersionDetected" After="FindRelatedProducts">
<![CDATA[NOT(Installed OR VersionNT = 601 OR (VersionNT = 600 AND VersionNT64))]]>
</Custom>
<Custom Action="CurrentVersionDetected" After="AppSearch">SELFFOUND</Custom>
</InstallUISequence>
But strangely same action work if i put it after InstallValidate
<Custom Action="FrameworkMissing" After="InstallValidate">
**<![CDATA[NETFRAMEWORK35]]> //This is fired**
</Custom>