Deployment Tools Foundation
Writing custom actions with .NET code means making use of the Deployment Tools Foundation (DTF). Here, we'll touch on some of the more common parts of the DTF library. However, you should also take a look at the DTF documentation that comes with WiX if you'd like to explore some of its other features. For example, although we won't cover it here, DTF has support for LINQ and CAB file compression. The examples in this section draw from DTF's Microsoft.Deployment.WindowsInstaller
namespace.
The session object
When the InstallUISequence
and InstallExecuteSequence
tables run through their lists of actions, they're doing so in their own memory space—called a session. You've seen how this requires you to mark WiX properties as public (uppercase) to get them from one session to the other. In DTF, the Session
object is your pipeline into each sequence's running state. Every .NET custom action method receives session
in its parameter list. If you recall, the generic signature...