If you are comfortable writing native code DLL files, I would recommend
using the technique described here
(http://blogs.msdn.com/icumove/archive/2009/06/23/custom-action-using-wix-re
ading-from-the-binary-table.aspx) after putting preagent.exe into the binary
table instead of the file table. It will then always be available for
installs, upgrades, removals, or any other time the MSI is present, no
matter when it is sequenced (during the script).

Write two custion actions: one immediate and one deferred. Only schedule the
immediate action at the appropriate location in ExecuteInstallSequence
between InstallInitialize and InstallFinalize.

Your immediate custom action would read the exe from the binary table and
"perform" (call via the MsiDoAction api) your deferred custom action. In
addition to the exe you would "send" any values from the session properties
in your installation transaction (such as your command-line or your temp
directory path) to the deferred action as well.

Your deferred custom action (which you set/mark for the appropriate user
environment) will extract the exe from the stream, write it to disk, run it
passing the command-line parameter, wait for it to end, erase it from disk,
and process the result code. Note that you should perform the write-to-disk
and run-from-disk in as secure a fashion as you can to prevent running code
that some rouge process infects before you launch it.

-----Original Message-----
From: Shlomi Tsadok [mailto:shl...@tsadok.net] 
Sent: Sunday, January 10, 2010 2:37 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Passing installation parameter to exe

1. Yes I can, but I don't want to do it maually on every workstation.
2.Only for installing.


Shlomi

On Fri, Jan 8, 2010 at 12:07 AM, Blair <os...@live.com> wrote:

> The second questions asks if you can set registry values/write file
> changes/whatever else that running the preagent.exe would have done for
you
> to avoid using it.
>
> Is preagent.exe needed by your installation after it is complete or only
> when installing, repairing, upgrading, and possibly removing the product?
>
> -----Original Message-----
> From: Shlomi Tsadok [mailto:shl...@tsadok.net]
>  Sent: Wednesday, January 06, 2010 10:44 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Passing installation parameter to exe
>
> 1. Preagent.exe is an instalation file of Novell ZenWorks agent.
> 2. I need to call it with parameters as the installing user(the system
> account in this case).
> 3. It will run unatennded, enforced by a machine GPO.
> 4. It should have those parameters every time it runs.
>
> "Can you do the same thing to the OS that it does with those parameters
> without running it?"
> Sorry, I didn't understand this quastion..
>
>
> Thanks for your time,
>
> Shlomi
>
> On Wed, Jan 6, 2010 at 6:26 PM, Blair <os...@live.com> wrote:
>
> > Preagent.exe is a file you are installing, using for configuration, or
> > both?
> > You need to call it with those parameters as the installing user or
> > elevated? It needs to be visible to the user when it runs or not? It
> should
> > have those parameters every time it runs or just once? Can you do the
> same
> > thing to the OS that it does with those parameters without running it?
> >
> > -----Original Message-----
> > From: Shlomi Tsadok [mailto:shl...@tsadok.net]
> > Sent: Wednesday, January 06, 2010 7:23 AM
> > To: wix-users@lists.sourceforge.net
> >   Subject: [WiX-users] Passing installation parameter to exe
> >
> > Hi,
> >
> > Here is the relevant lines from the wxs file:
> >
> >  <Component Id="zenpreagent"
Guid="CB70B54B-9BD2-4cc5-8D80-E129A7C02192">
> >                 <File Id="zenpreagent" LongName="preagent.exe"
> > Name="PREAGENT.EXE"
> > src="\\mf1\apps\Users\APPS_XP\Zen10Agent\GPO_MSI\preagent.exe"
> > DiskId="1" Compressed="no"/>
> >              </Component>
> >
> > How do I pass installtion parameters to preagent.exe?
> >
> > For example "preagent.exe -d d:\tmp"
> >
> >
> > Thanks,
> >
> > Shlomi
> >
> >
> >
>
>
----------------------------------------------------------------------------
> > --
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> > easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
>
>
----------------------------------------------------------------------------
> --
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> > easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
>
----------------------------------------------------------------------------
> --
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
>
----------------------------------------------------------------------------
--
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
----------------------------------------------------------------------------
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to