0

Suppose I have a custom action for my Wix Installer that needs the path from a file:

public static ActionResult AddUsbLanCertificate(Session session, string path) { //do something e.g. File.Copy(path, dest); return ActionResult.Success; } 

How can I tell this CustomAction where this file is located, How I can handover the path?

2
  • You need to send the folder to deferred mode via the CustomActionData mechanism. This mechanism essentially sends a property value into the custom action that needs it - property values are not available automatically in deferred mode (the installation mode that writes to the system). See this answer and this one. There is a GIT sample in there. Try it out? Commented Nov 30, 2020 at 16:59
  • Another issue is what you are trying to do. What is the task you need to perform? There could be better ways. Custom actions have many challenges. Commented Nov 30, 2020 at 17:06

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.