And correspondingly:
<CustomAction Id="RunQtExecCommand1" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
<CustomAction Id="RunQtExecCommand2" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
<CustomAction Id="RunQtExecCommand3" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
-----Original Message-----
From: Neil Sleightholm [mailto:[email protected]]
Sent: Tuesday, August 25, 2009 1:19 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to start an executable without showing
commandline window
I think your execute sequence needs to be something like:
<Custom Action="UpgradeStopServices1"
After="CostFinalize">PREVIOUSFOUND</Custom>
<Custom Action="RunQtExecCommand1"
After="UpgradeStopServices1">PREVIOUSFOUND</Custom>
<Custom Action="UpgradeStopServices2"
After="RunQtExecCommand1">PREVIOUSFOUND</Custom>
<Custom Action="RunQtExecCommand2"
After="UpgradeStopServices2">PREVIOUSFOUND</Custom>
<Custom Action="UpgradeStopServices3"
After="RunQtExecCommand2">PREVIOUSFOUND</Custom>
<Custom Action="RunQtExecCommand3"
After="UpgradeStopServices3">PREVIOUSFOUND</Custom>
Neil
-----Original Message-----
From: Jiang, Chunyan (GE Healthcare) [mailto:[email protected]]
Sent: 25 August 2009 15:32
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to start an executable without showing
commandline window
Hi Neil,
Thank you for your suggestion. I added another custom action as David Watson
suggested. It works fine. However, I want to define more than one such
custom action to perform calling executable quietly.
I defined them as:
<Property Id="QtExecCmdLine" Value="unset"/>
<CustomAction Id="RunQtExecCommand" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
<CustomAction Id='UpgradeStopServices1' Property='QtExecCmdLine'
Value='"[APPLICATIONFOLDER]VPCommon\tao_imr.exe" -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]VPCommon\Locator.ior shutdown
VPWEBSERVER'/>
<CustomAction Id='UpgradeStopServices2' Property='QtExecCmdLine'
Value='"[APPLICATIONFOLDER]VPCommon\tao_imr.exe" -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]VPCommon\Locator.ior shutdown
VPARCHIVESERVER_[ComputerName]'/>
<CustomAction Id='UpgradeStopServices3' Property='QtExecCmdLine'
Value='"[APPLICATIONFOLDER]VPCommon\tao_imr.exe" -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]VPCommon\Locator.ior shutdown
VPDICOMSERVER_[ComputerName]'/>
And in the Execute Sequence:
<Custom Action="UpgradeStopServices1"
Before="RunQtExecCommand">PREVIOUSFOUND</Custom>
<Custom Action="UpgradeStopServices2"
Before="RunQtExecCommand">PREVIOUSFOUND</Custom>
<Custom Action="UpgradeStopServices3"
Before="RunQtExecCommand">PREVIOUSFOUND</Custom>
<Custom Action="RunQtExecCommand"
After="CostFinalize">PREVIOUSFOUND</Custom>
I would like to add RunQtExecCommand CA after every needed custom actions.
But the compiler says "duplicated custom action". So I only add
RunQtExecCommand after the last one "UpgradeStopServices3". When I run the
.msi, only the last one executed. The other two CA didn't work.
How to resolve this problem?
Regards,
Chunyan
-----Ursprüngliche Nachricht-----
Von: Neil Sleightholm [mailto:[email protected]]
Gesendet: Montag, 24. August 2009 18:11
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to start an executable without showing
commandline window
You can't set the Property element to a formatted value ([APPLICATIONFOLDER]
in your case) you either need another custom action to set it or I think you
can use SetProperty if you arrange for your CustomAction/@Id value to match.
Neil
-----Original Message-----
From: Jiang, Chunyan (GE Healthcare) [mailto:[email protected]]
Sent: 24 August 2009 16:18
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] How to start an executable without showing command line
window
Hi Wix-users,
I want to call one executable in custom action. But I don't like the command
line window flashing when calling executable. So I tried to use CAQuietExec.
My code is as below:
<Property Id="QtExecCmdLine" Value="'tao_imr.exe' -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]/VPCommon/Locator.ior shutdown
VPWEBSERVER"/>
<CustomAction Id='UpgradeStopServices1' BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return='ignore' />
However, when I run the .msi, the custom action doesn't work. In the
installation log file, I found:
MSI (s) (BC:98) [17:09:50:140]: Doing action: UpgradeStopServices1 Action
17:09:50: UpgradeStopServices1.
Action start 17:09:50: UpgradeStopServices1.
MSI (s) (BC:00) [17:09:50:155]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI80C.tmp, Entrypoint: CAQuietExec MSI (s) (BC:50)
[17:09:50:155]: Generating random cookie.
MSI (s) (BC:50) [17:09:50:171]: Created Custom Action Server with PID 5520
(0x1590).
MSI (s) (BC:B4) [17:09:50:296]: Running as a service.
MSI (s) (BC:B4) [17:09:50:296]: Hello, I'm your 32bit Impersonated custom
action server.
MSI (s) (BC!D0) [17:09:50:311]: PROPERTY CHANGE: Deleting QtExecCmdLine
property. Its current value is ''tao_imr.exe' -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]/VPCommon/Locator.ior shutdown
VPWEBSERVER'.
CAQuietExec: Command string must begin with quoted application name.
CAQuietExec: Error 0x80070057: invalid command line property value
CAQuietExec: Error 0x80070057: failed to get Command Line Action ended
17:09:50: UpgradeStopServices1. Return value 1.
There are errors for CAQuietExec. What's wrong with the property value?
If I set the custom action as normal:
<CustomAction Id='UpgradeStopServices1' FileKey='tao_imr.exe'
ExeCommand='tao_imr.exe -ORBInitRef
ImplRepoService=file://[APPLICATIONFOLDER]/VPCommon/Locator.ior shutdown
VPWEBSERVER' Execute="immediate" Return='ignore' />
Then everything works fine, except the command line window flashing.
Could some one help me how to resolve this problem?
Best regards,
Chunyan
------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users