![]() Ok, now that we have our DLL added as a custom action, we need to pass the MSI install location to it. In our project, navigate to the Custom Actions Page and add a Call function from attached native DLL custom action and configure it like in the screenshot bellow: ![]() We are going to edit the MSI with Advanced Installer. Using using System using using System.Linq using System.Text using Microsoft.Win32 namespace TestCustomAction Īfter we added our changes in the code, build the DLL from Build > Build Solution. Key.SetValue("yourkey", session.CustomActionData) The only thing I modified in my code is this line: ![]() For this project, I want to write in the registry the INSTALLLOCATION of my MSI. If you had a look over the previous post, our DLL is quite simple and writes only some registry keys. In our DLL, we are going to use the session object and the CustomActionData property. In the last post, we had a look on how to create a C# (CSharp) DLL for MSI Custom Actions, but what if you want to create something more dynamic? What if we want to pass some MSI properties to our DLL, and in our DLL we use those arguments in our code to set things up?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |