I use the following to schedule a custom action by invoking a windows
executable called orwrap.exe and passing it a number of arguments.

The orwrap.exe could be replaced by java.exe and the same technique used
provided java.exe is actually present on the machine.  You may need to
interrogate the registry to make sure that it is present,  

Anyway, here is my WiX snippet,

...

        <!--
        **
        **  Custom Action to Configure Net Client
        **
        -->
        <CustomAction Id="ConfigureNetClientQuie_Cmd" 
                      Property="ConfigureNetClientQuieWithProperty" 
                      Value="&quot;[IngresBinDir]orwrap.exe&quot;
&quot;[IngresUtilityDir]ornetsetup.bat&quot;
&quot;$(var.INSTALLATIONCODE)&quot; &quot;/CONFIG&quot;" 
                      Execute="immediate" />
        <CustomAction Id="ConfigureNetClientQuieWithProperty" 
                      BinaryKey="WixCA" 
                      DllEntry="CAQuietExec" 
                      Execute="deferred" 
                      Return="check" 
                      Impersonate="no" />
...

        <UI>
            <ProgressText
Action="ConfigureNetClientQuieWithProperty">Configuring
Ingres_Net_$(var.INSTALLATIONCODE).  This can take up to three
minutes...</ProgressText>
        </UI>
...

Durwin Wright | Sr. Architect | durwin.wri...@ingres.com | Ingres | 500
Arguello Street | Suite 200 | Redwood City | CA | 94063 | USA  +1
650-587-5523 | fax: +1 650-587-5550 | "Wag the Dog" 
-----Original Message-----
From: Hoyt, David [mailto:ho...@llnl.gov] 
Sent: Thursday, September 09, 2010 5:16 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] how to call java from wix

Also, is that the correct way to specify command line arguments to an
executable in WiX?

The Windows installer supporting Java is irrelevant because he's not
trying to call Java code directly. Instead, he's simply passing
arguments to an executable that happens to understand Java jars and
execute the byte code contained in the jar's class files. It could be
any executable at all. Of course, he could be formatting the arguments
to that executable wrong -- which is a different issue altogether. (c:
But for now, try to look past the word "Java" in the message.

-----Original Message-----
From: Hoyt, David [mailto:ho...@llnl.gov] 
Sent: Thursday, September 09, 2010 5:04 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] how to call java from wix

I think the underlying question here isn't related to Java at all --
it's more "how do I call an external executable as a custom action and
why isn't [TARGETDIR] expanding to the full installation path I expect?"

Just from examining your example, though -- your last argument which I
assume is supposed to be the full class name (package + class name) of
the main method seems odd since you have "[TARGETDIR]\PatchWrapperMain"
which would expand to something like "C:\Program
Files\Impact360\PatchWrapperMain" which as far as I know isn't a valid
Java class name. (c: It should be something like
"com.impact360.PatchWrapperMain".

-----Original Message-----
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Thursday, September 09, 2010 4:35 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] how to call java from wix

I don't think that the Windows Installer supports calling into Java. Did
you
see something new in the MSI SDK that says they added support for custom
actions written in Java?

On Thu, Sep 9, 2010 at 3:08 PM, Major shao <majors...@gmail.com> wrote:

> Hi
> i want to call java from wix using customaction like the following. i
think
> at least TARGETDIR is wrong here, anything else?
> <CustomAction Id="PatchWrapper" Directory="TARGETDIR"
> ExeCommand="c:\Impact360\Software\JDK\bin\java -classpath
>
>
[TARGETDIR];[TARGETDIR]\emtEncrypt.jar;[TARGETDIR]\log4j-1.2.15.jar;[TAR
GETDIR]\commons-logging.jar;[TARGETDIR]\commonEjbTierUtils.jar
> [TARGETDIR]\PatchWrapperMain" />
>
>
------------------------------------------------------------------------
------
> Automate Storage Tiering Simply
> Optimize IT performance and efficiency through flexible, powerful,
> automated storage tiering capabilities. View this brief to learn how
> you can reduce costs and improve performance.
> http://**p.sf.net/sfu/dell-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://**lists.sourceforge.net/lists/listinfo/wix-users
>
>


-- 
virtually, Rob Mensching - http://**RobMensching.com LLC
------------------------------------------------------------------------
------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://**p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://**lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://*p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://*lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to