Discussion:
[WiX-users] Passing command line arguments to an app launched after setup
chaiguy1337
2008-10-23 00:38:26 UTC
Permalink
Hi all. I'm looking for a way to pass command line arguments to my app
launched when the installation is complete, so that my app knows it was
launched by the installer.

I basically copied the example from the help file:

<Property Id="WixShellExecTarget"
Value="[#OrangeNote.exe]" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />

Where might I add my "-installer" switch? I tried changing the Value of the
property to "[#OrangeNote.exe] -installer" but that didn't work at all, and
the app never launched.

Logan

-----
A. Logan Murray
http://pihole.org/
--
View this message in context: http://n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-tp1366362p1366362.html
Sent from the wix-users mailing list archive at Nabble.com.
Bob Arnson
2008-10-23 02:00:19 UTC
Permalink
Post by chaiguy1337
Hi all. I'm looking for a way to pass command line arguments to my app
launched when the installation is complete, so that my app knows it was
launched by the installer.
<Property Id="WixShellExecTarget"
Value="[#OrangeNote.exe]" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />
Where might I add my "-installer" switch? I tried changing the Value of the
property to "[#OrangeNote.exe] -installer" but that didn't work at all, and
the app never launched.
WixShellExecTarget must be only the path of the executable/document.
There's no support to add arguments. For that, use a "normal" exe custom
action instead of WixShellExec.
--
sig://boB
http://joyofsetup.com/
chaiguy1337
2008-10-23 02:22:09 UTC
Permalink
Is there a particular reason the example in the help file didn't use "normal"
exe custom actions? I don't want to do something that might cause problems
later.
Post by Bob Arnson
Post by chaiguy1337
Hi all. I'm looking for a way to pass command line arguments to my app
launched when the installation is complete, so that my app knows it was
launched by the installer.
<Property Id="WixShellExecTarget"
Value="[#OrangeNote.exe]" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />
Where might I add my "-installer" switch? I tried changing the Value of the
property to "[#OrangeNote.exe] -installer" but that didn't work at all, and
the app never launched.
WixShellExecTarget must be only the path of the executable/document.
There's no support to add arguments. For that, use a "normal" exe custom
action instead of WixShellExec.
--
sig://boB
http://joyofsetup.com/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
-----
A. Logan Murray
http://pihole.org/
--
View this message in context: http://n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-tp1366362p1366652.html
Sent from the wix-users mailing list archive at Nabble.com.
Bob Arnson
2008-10-23 02:38:14 UTC
Permalink
Post by chaiguy1337
Is there a particular reason the example in the help file didn't use "normal"
exe custom actions? I don't want to do something that might cause problems
later.
Because a more typical use case is to launch a document (like a
readme.html or .pdf). WixShellExec was designed just for that purpose.
Most users won't expect another install to launch after "finishing" one.
--
sig://boB
http://joyofsetup.com/
chaiguy1337
2008-10-23 02:41:55 UTC
Permalink
I wasn't talking about launching another install, I was talking about
launching the application that was just installed. I guess that makes sense
as to why ShellExec was chosen for the example. I will fiddle around with
normal custom actions and see if I can get it working.
Post by Bob Arnson
Post by chaiguy1337
Is there a particular reason the example in the help file didn't use "normal"
exe custom actions? I don't want to do something that might cause problems
later.
Because a more typical use case is to launch a document (like a
readme.html or .pdf). WixShellExec was designed just for that purpose.
Most users won't expect another install to launch after "finishing" one.
--
sig://boB
http://joyofsetup.com/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
-----
A. Logan Murray
http://pihole.org/
--
View this message in context: http://n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-tp1366362p1366725.html
Sent from the wix-users mailing list archive at Nabble.com.
chaiguy1337
2008-10-23 03:20:36 UTC
Permalink
Thanks! Got it working.
Post by Bob Arnson
Post by chaiguy1337
Is there a particular reason the example in the help file didn't use "normal"
exe custom actions? I don't want to do something that might cause problems
later.
Because a more typical use case is to launch a document (like a
readme.html or .pdf). WixShellExec was designed just for that purpose.
Most users won't expect another install to launch after "finishing" one.
--
sig://boB
http://joyofsetup.com/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
-----
A. Logan Murray
http://pihole.org/
--
View this message in context: http://n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-tp1366362p1366796.html
Sent from the wix-users mailing list archive at Nabble.com.
TimM
2014-05-22 15:49:09 UTC
Permalink
Bob, what was the 'normal' custom action that you used at the end of the
install to launch your app with arguments?

I was also using LaunchApplication to trigger the launch of my application
at the end of the UI by check box selection, but I also needed to supply
arguments and therefore it did not work.

I was just searching for 'launch app at end of install' and that was the
main one I found and therefore did not see any entries for this 'normal'
custom action.

So if you can give me a little example of this 'normal' CA that would be
great..

Thanks.



--
View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Passing-command-line-arguments-to-an-app-launched-after-setup-tp1366362p7594862.html
Sent from the wix-users mailing list archive at Nabble.com.

Loading...