Thanks for your help Blair.
  Just to clarify for anyone else trying this. NotSet is actually a
string literal. So the correctly working condition is actually...

((WIX_DIRECTX_PIXELSHADERVERSION < 200) OR (
WIX_DIRECTX_PIXELSHADERVERSION = "NotSet" ) ) 
OR ((WIX_DIRECTX_VERTEXSHADERVERSION < 200) OR (
WIX_DIRECTX_VERTEXSHADERVERSION = "NotSet" ) )

Dominique.

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: 02 October 2009 22:15
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] CustomAction Error not displaying...

According to the wix docs, those properties are NotSet if the API errors
out. So, without testing, I would suppose that you would need (for your
error message's condition):

((WIX_DIRECTX_PIXELSHADERVERSION < 200) OR NOT
WIX_DIRECTX_PIXELSHADERVERSION) AND ((WIX_DIRECTX_VERTEXSHADERVERSION <
200)
OR NOT WIX_DIRECTX_VERTEXSHADERVERSION)

Or possibly (more simply, if the values don't really matter):

(NOT WIX_DIRECTX_PIXELSHADERVERSION) AND (NOT
WIX_DIRECTX_VERTEXSHADERVERSION)

-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com] 
Sent: Friday, October 02, 2009 8:03 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] CustomAction Error not displaying...

Hi all,
  I'm trying to detect if certain pixel and vertex shaders are installed
on a machine. I have followed the exampled in the Wix 3.0 help, but I'm
not getting the desired error message.

<PropertyRef Id="WIX_DIRECTX_PIXELSHADERVERSION"/>
<PropertyRef Id="WIX_DIRECTX_VERTEXSHADERVERSION"/>  

<CustomAction Id="CA_CheckPixelVertexShaderVersion" Error="[ProductName]
This application requires DirectX 9 with pixel shader and vertex shader
version 2.0 or greater, for Previewer to work correctly." />

<InstallExecuteSequence>    
    <!-- Things to do during install -->
    <Custom Action="CA_CheckPixelVertexShaderVersion"
After="WixQueryDirectXCaps">
      <![CDATA[(WIX_DIRECTX_PIXELSHADERVERSION < 200) AND
(WIX_DIRECTX_VERTEXSHADERVERSION < 200) ]]>
    </Custom>
    
    <!-- Things to do during uninstall -->    
    
  </InstallExecuteSequence>

  <InstallUISequence>
    <Custom Action="CA_CheckPixelVertexShaderVersion"
After="WixQueryDirectXCaps">
      <![CDATA[(WIX_DIRECTX_PIXELSHADERVERSION < 200) AND
(WIX_DIRECTX_VERTEXSHADERVERSION < 200) ]]>
    </Custom>
    
  </InstallUISequence>

When I run the above code on a virtual machine, which obviously does not
have the required pixel shader support, the log files says...
Action 14:36:53: WixQueryDirectXCaps. 
Action start 14:36:53: WixQueryDirectXCaps.
WixQueryDirectXCaps:  Error 0x8876086a: GetDeviceCaps call failed
Action ended 14:36:54: WixQueryDirectXCaps. Return value 1.

But My error message is never displayed. 

When I run it on a real machine I correctly get the
WIX_DIRECTX_PIXELSHADERVERSION and WIX_DIRECTX_VERTEXSHADERVERSION
variables set with the right values.

What am I missing/doing wrong?

Thanks,

DOMINIQUE LOUIS | IS DEVELOPER, AMX DIGITAL MEDIA GROUP
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to