Discussion:
[WiX-users] How to open a document after install?
David Bartmess
2009-03-13 19:46:33 UTC
Permalink
I'm trying to schedule a document to be opened when the user clicks on the Finish button on the ExitDialog.

What type of custom action is needed to do this? I keep getting the error below that it must be scheduled between InstallInitialize and InstallFinalize. But I've seen other documents online that say you just publish on the Exit control and it will be done after leaving the installer.

Any help would be appreciated...


<UI>
. . .

<Publish Dialog="ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="DisplayLibraryPDF"><![CDATA[DISPLAYLIBRARY = "1" AND NOT REMOVE]]></Publish>
<Publish Dialog="ExitDialog" Control="Finish" Order="2" Event="DoAction" Value="DisplayCalendarPDF"><![CDATA[DISPLAYCALENDAR = "1" AND NOT REMOVE]]></Publish>
<Publish Dialog="ExitDialog" Control="Finish" Order="3" Event="DoAction" Value="DisplayDashboardPDF"><![CDATA[DISPLAYDASHBOARD = "1" AND NOT REMOVE]]></Publish>
</UI>

<CustomAction Id="DisplayLibraryPDF"
Directory="CommonDocs"
ExeCommand="[WindowsFolder]cmd.exe /c [!MaestroLibraryUserGuide.pdf]"
Execute="deferred"
Impersonate="yes"
Return="asyncNoWait" />
<CustomAction Id="DisplayCalendarPDF"
Directory="CalendarDocs"
ExeCommand="[WindowsFolder]cmd.exe /c [!MaestroCalendarUserGuide.pdf]"
Execute="deferred"
Impersonate="yes"
Return="asyncNoWait" />
<CustomAction Id="DisplayDashboardPDF"
Directory="DashboardDocs"
ExeCommand="[WindowsFolder]cmd.exe /c [!MaestroDashboardUserGuide.pdf]"
Execute="deferred"
Impersonate="yes"
Return="asyncNoWait" />


LOG RESULTS:
Action start 13:39:53: ExitDialog.
Action 13:39:53: ExitDialog. Dialog created
MSI (c) (40:E4) [13:39:55:453]: Doing action: DisplayLibraryPDF
MSI (c) (40:E4) [13:39:55:453]: Note: 1: 2205 2: 3: ActionText
Action 13:39:55: DisplayLibraryPDF.
Action start 13:39:55: DisplayLibraryPDF.
MSI (c) (40:E4) [13:39:55:453]: Note: 1: 2762
DEBUG: Error 2762: Unable to schedule operation. The action must be scheduled between InstallInitialize and InstallFinalize.
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2762. The arguments are: , ,
MSI (c) (40:E4) [13:39:57:125]: Product: MaestroLink Client 1.0.0.0 -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2762. The arguments are: , ,

Action ended 13:39:57: DisplayLibraryPDF. Return value 3.



David Bartmess

Wall Street On Demand
Bob Arnson
2009-03-14 17:22:35 UTC
Permalink
Post by David Bartmess
What type of custom action is needed to do this?
One that's not deferred. And look at "ShellExecute Custom Action" in
wix.chm instead of using cmd.exe and its ugly console window.
--
sig://boB
http://joyofsetup.com/
Continue reading on narkive:
Loading...