Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WIX - Adding a C# custom action code

I'm creating a program which is being installed by Wix, using VS 2010 and I've already got the product.wxs ready.

Now I want to add a custom C# action to the installation. I've searched how to do it and found this guide: How do I create fully fledged C# custom actions?

The problem is that I don't understand all the instructions, specifically in this section of the guide: Integrate the C# custom action in Advanced Installer

I've created the Custom Action project but I don't understand how do I tell the setup project to run that custom action and how do I set the action to run at install in the commit phase.

Another related thing. How in the C# code can I get the installation path that the user chose to install to?

like image 522
Yonatan Nir Avatar asked Feb 15 '23 00:02

Yonatan Nir


1 Answers

That tutorial is for how to use WiX managed custom actions with "Advance Installer", a commercial tool for creating installers.

Here is a good explanation on how to create WiX Custom Actions in C#, to use with the WiX toolset.

like image 109
Andres Denkberg Avatar answered Feb 17 '23 14:02

Andres Denkberg