Thank you, that got me pointed in the right direction. For anyone running into
this issue or a similar one in the future, here is the detailed solution. It
is not limited to HTA applications.
I needed to run "C:\Windows\System32\mshta.exe C:\<path>\rbs.Configure.hta"
when the install completed and the user checked the "Launch <productname>"
checkbox.
To do this I needed "Custom Action Type 34" which calls an executable that
already exists on the target system AND is not installed with the application
during the current session. A good explanation can be found in Alex Shevchuk's
"From MSI to WiX, Part 5, Custom Actions: Introduction."
Here are the relevant excerpts from my WSX file:
<File Id='RSWBConfigToolFile' Name='rbs.Configure.hta' DiskId='1'
Source='SourceDir\rbs.Configure.hta' KeyPath='yes'>
<CustomAction Id='LaunchFile'
Directory="INSTALLDIR"
ExeCommand='[SystemFolder]mshta.exe [#RSWBConfigToolFile]'
Return="asyncNoWait" />
<Dialog Id="ExitDlg" Width="370" Height="270" Title="[ProductName] [Setup]"
NoMinimize="yes">
<Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Cancel="yes" Text="[ButtonText_Finish]">
<Publish Event="EndDialog" Value="Return">1</Publish>
<Publish Event='DoAction' Value='LaunchFile'>(NOT Installed)
AND (LAUNCHPRODUCT = 1)</Publish>
</Control>
<Control Id="Launch" Type="CheckBox" X="135" Y="120" Width="150"
Height="17" Property='LAUNCHPRODUCT' CheckBoxValue='1'>
<Text>Launch [ProductName]</Text>
</Control>
</Dialog>
> -----Original Message-----
> From: Christopher Painter [mailto:[email protected]]
> Sent: Monday, May 02, 2011 10:47 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Is it possible to launch an HTA from an MSI built
> using WiX?
>
> .hta files are documents not programs. You have to invoke the Microsoft HTML
> Application Host ( mshta ) to open/process them.
>
> ---
> Christopher Painter, Author of Deployment Engineering Blog
> Have a hot tip, know a secret or read a really good thread that deserves
> attention? E-Mail
> Me
>
> --- On Mon, 5/2/11, Simpson, John R <[email protected]> wrote:
>
>
> From: Simpson, John R <[email protected]>
> Subject: [WiX-users] Is it possible to launch an HTA from an MSI built using
> WiX?
> To: "[email protected]" <[email protected]>
> Date: Monday, May 2, 2011, 9:03 AM
>
>
> With the help of the WiX documentation and excellent tutorial at
> http://www.tramontana.co.hu/wix/, I've been able to create a WXS/MSI
> installer that does
> everything I need except launch the HTA application when the install
> completes. Double-
> clicking the HTA after the install runs the app as expected.
>
>
> I've been able to find examples for running EXE, VBS, and DLL based apps when
> the
> install completes, but not HTAs. Is this possible? If so, can someone
> provide an example?
>
> Thank you,
>
> John
>
> John Simpson
> Senior Software Engineer, I. T. Engineering and Operations
> Reynolds and Reynolds
> One Reynolds Way | Kettering, Ohio 45430
> office 937.485.8304
> [email protected]<mailto:[email protected]>
> MAKING BUSINESS BETTER.
> NOTE: The information contained in this e-mail is personal and confidential
> and may be
> protected by the attorney-client privilege and/or the work product doctrine.
> It is for the
> sole use of the intended recipient. Any review, reliance, or distribution by
> others or
> forwarding without express permission is strictly prohibited. If you are not
> the intended
> recipient, please contact the sender and delete all copies.
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users