It is now nearly 2am and I've spent literally hours searching the
internet for an answer, to no avail.
I hope someone here can point me in the right direction.

I'm trying to write a custom action using VBScript using the
Script="vbscript" attribute.

My Action looks like this...
<CustomAction Id="CA_CheckPixelVertexShaderVersion"                  
                  Script="vbscript"
                  Execute="immediate">
    <![CDATA[
      CheckShaderVersions
      
      Function CheckShaderVersions()
        'On Error Resume Next
        Dim response, PixelShaderVersion, VertexShaderVersion
        
        PixelShaderVersion =
Session.Property("WIX_DIRECTX_PIXELSHADERVERSION")
        VertexShaderVersion =
Session.Property("WIX_DIRECTX_VERTEXSHADERVERSION")
        
        If ( ( ( PixelShaderVersion < "200" ) Or ( PixelShaderVersion =
"NotSet" ) ) _
        Or ( ( VertexShaderVersion < "200" ) Or ( VertexShaderVersion =
"NotSet" ) ) ) Then
        
          response = MsgBox( Session.Property("ProductName") & "requires
DirectX 9 with pixel shader and vertex shader version 2.0 or greater,
for this application to work correctly." & Vbcrlf & " Would you like to
proceed with the installation anyway?", 52,"Graphics Card Capabilities")
          If ( response = 6 ) Then
            CheckShaderVersions = 1
          Else
            CheckShaderVersions = 3
          End If
          
        Else
          CheckShaderVersions = 1
        End If
        
      End Function
    ]]>
  </CustomAction>

My problem is that I cannot find a way to get the CheckShaderVersions()
function's error/exit code to be recognized by MSI. It does not bubble
up as it were. I've even tried remove the function declaration so that
the code is called directly. I'm trying to avoid sticking this code
inside a *.vbs file.
So my question is, Is it possible to get some Script="vbscript" code to
correctly return a exit code or 1 or 3? 
I suppose it is the equivalent of a main() returning a value.
I'm guessing it must be simple in Vbscript, but I can't find anything
about it anywhere.

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