install - Multiple entry in C# custom action dll in WIX -


can have multiple dll entry below example :

i have 1 binary entry :

<binary id="sqlbrowse" sourcefile="..\sqlbrowse\bin\debug\sqlbrowse.ca.dll"/> 

calling custom action

<customaction id="sqlbrowsevalidate" binarykey="sqlbrowse"                dllentry="sqlvalidate" execute="immediate" return="asyncwait"> </customaction> <customaction id="sqlbrowseid" binarykey="sqlbrowse"                dllentry="customaction1" execute="immediate"> </customaction> 

i have 2 ca :

 public static actionresult customaction1(session xisession)         {}  public static actionresult sqlvalidate(session sqlsession)         {} 

yes, can that. add logging information using session.log:

first create .net custom actions:

public class customactions {   [customaction]   public static actionresult customaction1(session session)   {     session.log("executing customaction1");     return actionresult.success;   }    [customaction]   public static actionresult customaction2(session session)   {     session.log("begin customaction2");     return actionresult.success;   } } 

then schedule when execute. i.e.:

<binary id="sqlbrowse" sourcefile="..\sqlbrowse\bin\debug\sqlbrowse.ca.dll"/> <customaction id="customaction1" binarykey="sqlbrowse"                dllentry="customaction1" execute="immediate"></customaction> <customaction id="customaction2" binarykey="sqlbrowse"                dllentry="customaction2" execute="immediate"></customaction>  <installexecutesequence>   <custom action='customaction1' before='installvalidate'/>   <custom action='customaction2' before='installfinalize'/> </installexecutesequence> 

then create logfile when installing:

msiexec /i "yourinstaller.msi" /l*v "log.txt"

now can verify ca's have been called.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -