You can certainly do that. You should include both the C# dll and the
executable that calls it in your installer. Then make a CustomAction
element that defines the custom action. Make sure to use the FileKey
attribute to reference the executable's file ID (i.e "Myfile.exe") as
well as any of the other attributes that apply:

<CustomAction Id="SetupDatabase" Impersonate="yes" Return="check"
Execute="immediate" FileKey="Myfile.exe" ExeCommand=""/>

Then create a Custom element that schedules the custom action to happen
after the files are installed:

<InstallExecuteSequence>
<Custom Action="SetupDatabase" After="InstallFinalize">1</Custom>
</InstallExecuteSequence>

(I am not 100% sure about the After="InstallFinalize" - perhaps someone
else has a reccomendation on where to schedule the action).

Hopefully that helps get you on your way.

- Brett

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of JCWrs
> Sent: Wednesday, April 11, 2007 12:29 PM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Custom Action that references C# classes?
> 
> 
> One of our developers has written a class that is able to 
> set-up all of the virtual directories, websites and IIS that 
> our app requires.  Is there a way to write a custom action 
> that executes a file that calls functions from this C#.Net class?
> 
> I realize that I can call pre-defined Custom Actions to 
> set-up all of this using certain wixlib's, but I'm trying to 
> avoid doing so if possible (why re-write it all when its 
> already done?).
> --
> View this message in context: 
> http://www.nabble.com/Custom-Action-that-references-C--classes
--tf3560476.html#a9943333
> Sent from the wix-users mailing list archive at Nabble.com.
> 
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to