wix3.5 - Stop setup error inside Custom Action With WIX installer -
can able stop setup if error display inside customaction. can able display error message inside custom action , it's dispaly error message click on ok button next ui sequence form appearing.how force user finish button?
adding source code:
<binary id="bin_customaction" sourcefile="customaction.ca.dll" /> <customaction id="ca_checklist" binarykey="bin_customaction" dllentry="ca_checklist" execute="immediate" impersonate="yes" return="ignore" /> <ui id="mywixui_mondo"> <uiref id="wixui_mondo" /> <uiref id="wixui_errorprogresstext" /> <dialogref id="userregistrationdlg" /> <dialog id="userregistrationdlg" width="370" height="270" title="[productname] setup" nominimize="yes"> <control id="comboboxmain" type="combobox" x="124" y="158" width="241" height="16" property="locationname"> </control> <control id="back" type="pushbutton" x="180" y="243" width="56" height="17" text="&back"> <publish event="newdialog" value="licenseagreementdlg">1</publish> </control> <control id="next" type="pushbutton" x="236" y="243" width="56" height="17" default="yes" text="&next"> <publish event="spawndialog" value="setuptypedlg">1</publish> </control> <control id="cancel" type="pushbutton" x="304" y="243" width="56" height="17" cancel="yes" text="cancel"> <publish event="spawndialog" value="canceldlg">1</publish> </control> </dialog> <control id="next" type="pushbutton" x="180" y="243" width="56" height="17" text="&next"> <publish event="doaction" value="radiobuttoncheck">1</publish> </control> </dialog>--> <publish dialog="licenseagreementdlg" control="next" event="newdialog" value="userregistrationdlg" order="3"> licenseaccepted = "1" </publish> <publish dialog="setuptypedlg" control="back" event="newdialog" value="userregistrationdlg">1</publish> </ui> <installuisequence> <custom action="ca_checklist" before="appsearch">not installed</custom> </installuisequence> [customaction] public static actionresult ca_checklist(session session) { if (installer.liststatus == false) { // dispaly record record = new record(); record.formatstring = string.format("error!"); session.message( installmessage.error | (installmessage)(messageicon.error) | (installmessage)messagebuttons.ok,record); return actionresult.failure; } else { return actionresult.success; } }
add screen shot proving once click on ok button of image(1) next dialog i.e image (2) appearing:- instead of need finish dialog when getting error.
1)
2)
any idea??kindly me.
this old post i'd answer question in case else finds this. in custom action definition, customaction id="ca_checklist" binarykey="bin_customaction" ..., 'return' set 'ignore'. should set 'check'.
Comments
Post a Comment