Re: [WiX-users] Quiet Execution of an executable embedded within the MSI

2010-06-18 Thread Jeremy Farrell
The traditional way to do this (discussed on this list a few times a few years 
ago) is a little hacky, but works well enough.

1) Put your executable in a self-extracting archive, using iexpress for example;

2) execute the self-extracting archive from the binary table in a 'quiet' mode, 
putting your executable in a well-known place (such as [TempFolder]);

3) use CAQuietExec to run your program from the well-known place;

4) use CAQuietExec to delete your program from the well-known place.

> -Original Message-
> From: Pally Sandher [mailto:pally.sand...@iesve.com] 
> Sent: Friday, June 18, 2010 4:29 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Quiet Execution of an executable 
> embedded within the MSI
> 
> Binary Elements are extracted to temporary directories using auto
> generated filenames (see a verbose log for an example). It's not
> possible to use an application in a Binary Element with 
> QtExec (I looked
> at the same thing a while ago for a plug-in installer). You'll either
> need to change it to use a File Element & modify the 
> CustomAction to use
> [#fileid] instead of "myexec.exe" or live without 
> QtExec or as
> Blair says, write your own Custom Actions to write the Binary 
> to disk in
> a known location so QtExec can run it.
> 
> Palbinder Sandher 
> Software Deployment & IT Administrator
> T: +44 (0) 141 945 8500 
> F: +44 (0) 141 945 8501 
> 
> http://www.iesve.com 
> **Design, Simulate + Innovate with the **
> Integrated Environmental Solutions Limited. Registered in Scotland No.
> SC151456 
> Registered Office - Helix Building, West Of Scotland Science Park,
> Glasgow G20 0SP
> Email Disclaimer
> 
> -Original Message-----
> From: Leigh Wetmore [mailto:lwetm...@gmail.com] 
> Sent: 17 June 2010 18:29
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Quiet Execution of an executable embedded within
> the MSI
> 
> Hello,
> 
> I'm trying to figure out how to quietly execute (QtExec) an executable
> that I include within my MSI yet do not want installed on the user's
> machine.
> 
> I've been able to achieve this without using the quiet 
> execute feature,
> but I don't like the command window popping up during installation.
> Here is the code for that:
> 
> 
> 
>Id="LaunchCfgUpdateExe"
>   BinaryKey="CfgUpdateExe"
>   ExeCommand=""[TempFolder]UpdateLog.txt" 
> UpdateAppConfig
> "[DASLocation]myexec.exe.Config""
>   Execute="deferred"
>   Impersonate="no"
>   Return="asyncNoWait" />
> 
> 
>After="InstallInitialize">OLDERVERSIONDETECTED
> 
> 
> I use the binary element to bring the executable (myexe.exe) into the
> MSI, then launch a custom action with the necessary arguments.  I have
> it executing as deferred with no impersonation as I need the admin
> privileges already captured by the installer to carry through to the
> executable.
>  Again, this works fine.
> 
> However, if I try to convert this to use QtExec, I'm unable 
> to get it to
> work.  Looking in the MSI install log, I see:
> 
> CAQuietExec:  Error 0x80070002: Command failed to execute.
> CAQuietExec:  Error 0x80070002: CAQuietExec Failed
> 
> Here is my code so far:
> 
> 
> 
>Id="QtExecCommand"
>   Property="QtExecUserCfg"
>   Value=""myexec.exe"
> "[TempFolder]UpdateLog.txt"
> "UpdateAppConfig" 
> "[DASLocation]myexec.exe.Config""
>   Execute="immediate" />
>  DllEntry="CAQuietExec" Execute="deferred" Impersonate="no"
> Return="check"/>
> 
> 
>After="CostFinalize">OLDERVERSIONDETECTED
>After="InstallInitialize">OLDERVERSIONDETECTED
> 
> 
> I've left the binary element there, but I don't think the 
> custom actions
> know about it.  It looks like QtExec can't find the executable which
> makes sense (I can have it run notepad.exe no problem).  I'm thinking
> maybe the files in the MSI, including myexec.exe, get extracted to a
> temp directory during installation, and I can potentially 
> reference it,
> like Value=""[MSITempDir]myexec.exe...?
> 
> Thanks in advance for any help anyone can provide.
> 
> Leigh
> --
> --
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father

Re: [WiX-users] Quiet Execution of an executable embedded within the MSI

2010-06-18 Thread Leigh Wetmore
Thanks for the responses - I've gone with the file element.  I don't really
want the executable written to disk (it serves no purpose to the end user),
but there's no harm in it being there.

On Fri, Jun 18, 2010 at 7:28 AM, Pally Sandher wrote:

> Binary Elements are extracted to temporary directories using auto
> generated filenames (see a verbose log for an example). It's not
> possible to use an application in a Binary Element with QtExec (I looked
> at the same thing a while ago for a plug-in installer). You'll either
> need to change it to use a File Element & modify the CustomAction to use
> [#fileid] instead of "myexec.exe" or live without QtExec or as
> Blair says, write your own Custom Actions to write the Binary to disk in
> a known location so QtExec can run it.
>
> Palbinder Sandher
> Software Deployment & IT Administrator
> T: +44 (0) 141 945 8500
> F: +44 (0) 141 945 8501
>
> http://www.iesve.com
> **Design, Simulate + Innovate with the **
> Integrated Environmental Solutions Limited. Registered in Scotland No.
> SC151456
> Registered Office - Helix Building, West Of Scotland Science Park,
> Glasgow G20 0SP
> Email Disclaimer
>
> -Original Message-
> From: Leigh Wetmore [mailto:lwetm...@gmail.com]
> Sent: 17 June 2010 18:29
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Quiet Execution of an executable embedded within
> the MSI
>
> Hello,
>
> I'm trying to figure out how to quietly execute (QtExec) an executable
> that I include within my MSI yet do not want installed on the user's
> machine.
>
> I've been able to achieve this without using the quiet execute feature,
> but I don't like the command window popping up during installation.
> Here is the code for that:
>
>
>
>  Id="LaunchCfgUpdateExe"
>  BinaryKey="CfgUpdateExe"
>  ExeCommand=""[TempFolder]UpdateLog.txt" UpdateAppConfig
> "[DASLocation]myexec.exe.Config""
>  Execute="deferred"
>  Impersonate="no"
>  Return="asyncNoWait" />
>
>
>   After="InstallInitialize">OLDERVERSIONDETECTED
>
>
> I use the binary element to bring the executable (myexe.exe) into the
> MSI, then launch a custom action with the necessary arguments.  I have
> it executing as deferred with no impersonation as I need the admin
> privileges already captured by the installer to carry through to the
> executable.
>  Again, this works fine.
>
> However, if I try to convert this to use QtExec, I'm unable to get it to
> work.  Looking in the MSI install log, I see:
>
> CAQuietExec:  Error 0x80070002: Command failed to execute.
> CAQuietExec:  Error 0x80070002: CAQuietExec Failed
>
> Here is my code so far:
>
>
>
>  Id="QtExecCommand"
>  Property="QtExecUserCfg"
>  Value=""myexec.exe"
> "[TempFolder]UpdateLog.txt"
> "UpdateAppConfig" "[DASLocation]myexec.exe.Config""
>  Execute="immediate" />
> DllEntry="CAQuietExec" Execute="deferred" Impersonate="no"
> Return="check"/>
>
>
>   After="CostFinalize">OLDERVERSIONDETECTED
>   After="InstallInitialize">OLDERVERSIONDETECTED
>
>
> I've left the binary element there, but I don't think the custom actions
> know about it.  It looks like QtExec can't find the executable which
> makes sense (I can have it run notepad.exe no problem).  I'm thinking
> maybe the files in the MSI, including myexec.exe, get extracted to a
> temp directory during installation, and I can potentially reference it,
> like Value=""[MSITempDir]myexec.exe...?
>
> Thanks in advance for any help anyone can provide.
>
> Leigh
> 
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's
> Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit.  See the
> prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
>
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Quiet Execution of an executable embedded within the MSI

2010-06-18 Thread Pally Sandher
Binary Elements are extracted to temporary directories using auto
generated filenames (see a verbose log for an example). It's not
possible to use an application in a Binary Element with QtExec (I looked
at the same thing a while ago for a plug-in installer). You'll either
need to change it to use a File Element & modify the CustomAction to use
[#fileid] instead of "myexec.exe" or live without QtExec or as
Blair says, write your own Custom Actions to write the Binary to disk in
a known location so QtExec can run it.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the **
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-Original Message-
From: Leigh Wetmore [mailto:lwetm...@gmail.com] 
Sent: 17 June 2010 18:29
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Quiet Execution of an executable embedded within
the MSI

Hello,

I'm trying to figure out how to quietly execute (QtExec) an executable
that I include within my MSI yet do not want installed on the user's
machine.

I've been able to achieve this without using the quiet execute feature,
but I don't like the command window popping up during installation.
Here is the code for that:






  OLDERVERSIONDETECTED


I use the binary element to bring the executable (myexe.exe) into the
MSI, then launch a custom action with the necessary arguments.  I have
it executing as deferred with no impersonation as I need the admin
privileges already captured by the installer to carry through to the
executable.
 Again, this works fine.

However, if I try to convert this to use QtExec, I'm unable to get it to
work.  Looking in the MSI install log, I see:

CAQuietExec:  Error 0x80070002: Command failed to execute.
CAQuietExec:  Error 0x80070002: CAQuietExec Failed

Here is my code so far:







  OLDERVERSIONDETECTED
  OLDERVERSIONDETECTED


I've left the binary element there, but I don't think the custom actions
know about it.  It looks like QtExec can't find the executable which
makes sense (I can have it run notepad.exe no problem).  I'm thinking
maybe the files in the MSI, including myexec.exe, get extracted to a
temp directory during installation, and I can potentially reference it,
like Value=""[MSITempDir]myexec.exe...?

Thanks in advance for any help anyone can provide.

Leigh

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's
Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit.  See the
prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Quiet Execution of an executable embedded within the MSI

2010-06-17 Thread Blair
Things in the Binary table are only extracted when other code calls the APIs
to extract them, so the/a custom action would be required to know to get it
from there. To make it more complicated, the extraction code must be run
from an immediate action, so an immediate/deferred pair (immediate to
"stream" the binary content into the CustomActionData and the deferred to
write it to disk/run it/cleanup) is required to perform the activity
securely. QtExec doesn't do that.

If someone hasn't already written something like that and released it, I'm
more than willing to, but I'll need some contribution to cover my time...

-Original Message-
From: Leigh Wetmore [mailto:lwetm...@gmail.com] 
Sent: Thursday, June 17, 2010 10:29 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Quiet Execution of an executable embedded within the
MSI

Hello,

I'm trying to figure out how to quietly execute (QtExec) an executable that
I include within my MSI yet do not want installed on the user's machine.

I've been able to achieve this without using the quiet execute feature, but
I don't like the command window popping up during installation.  Here is the
code for that:






  OLDERVERSIONDETECTED


I use the binary element to bring the executable (myexe.exe) into the MSI,
then launch a custom action with the necessary arguments.  I have it
executing as deferred with no impersonation as I need the admin privileges
already captured by the installer to carry through to the executable.
 Again, this works fine.

However, if I try to convert this to use QtExec, I'm unable to get it to
work.  Looking in the MSI install log, I see:

CAQuietExec:  Error 0x80070002: Command failed to execute.
CAQuietExec:  Error 0x80070002: CAQuietExec Failed

Here is my code so far:







  OLDERVERSIONDETECTED
  OLDERVERSIONDETECTED


I've left the binary element there, but I don't think the custom actions
know about it.  It looks like QtExec can't find the executable which makes
sense (I can have it run notepad.exe no problem).  I'm thinking maybe the
files in the MSI, including myexec.exe, get extracted to a temp directory
during installation, and I can potentially reference it, like
Value=""[MSITempDir]myexec.exe...?

Thanks in advance for any help anyone can provide.

Leigh

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Quiet Execution of an executable embedded within the MSI

2010-06-17 Thread Leigh Wetmore
Hello,

I'm trying to figure out how to quietly execute (QtExec) an executable that
I include within my MSI yet do not want installed on the user's machine.

I've been able to achieve this without using the quiet execute feature, but
I don't like the command window popping up during installation.  Here is the
code for that:






  OLDERVERSIONDETECTED


I use the binary element to bring the executable (myexe.exe) into the MSI,
then launch a custom action with the necessary arguments.  I have it
executing as deferred with no impersonation as I need the admin privileges
already captured by the installer to carry through to the executable.
 Again, this works fine.

However, if I try to convert this to use QtExec, I'm unable to get it to
work.  Looking in the MSI install log, I see:

CAQuietExec:  Error 0x80070002: Command failed to execute.
CAQuietExec:  Error 0x80070002: CAQuietExec Failed

Here is my code so far:







  OLDERVERSIONDETECTED
  OLDERVERSIONDETECTED


I've left the binary element there, but I don't think the custom actions
know about it.  It looks like QtExec can't find the executable which makes
sense (I can have it run notepad.exe no problem).  I'm thinking maybe the
files in the MSI, including myexec.exe, get extracted to a temp directory
during installation, and I can potentially reference it, like
Value=""[MSITempDir]myexec.exe...?

Thanks in advance for any help anyone can provide.

Leigh
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users