bryanpjohnston

A blog by someone with not much to say.

Category: .NET

Custom WiX Managed Bootstrapper Application

I put together a sample project to show the minimum code needed to create your own managed bootstrapper application using WiX. I wrote it in C# using the MVVM pattern. This is indeed a bare bones example and if you are serious about writing your own managed bootstrapper application, you should download the WiX 3.6 source code and follow their example (see src\Setup\WixBA).

My solution contains three projects (can download the full source here).

  • TestBA:  The bootstrapper UX.
  • BootstrapperSetup:  The main bootstrapper executable that lists the packages to be installed.
  • DummyInstaller:  A dummy .msi that gets installed by the bootstrapper.

Read the rest of this entry »

Advertisements

Hosting Licensed ActiveX Controls in WPF

Recently we had a need to host some ActiveX controls inside a WPF window. Hosting controls in a .NET Windows Forms app is pretty straight-forward, basically register the control, add it to your toolbox in Visual Studio, then drag-n-drop the control on your form. Hosting the control in a WPF window is possible by the use of a WindowsFormsHost. Here is a walkthrough for hosting an ActiveX control in WPF from MSDN.

However we found that some of our controls gave licensing errors which crashed the application. These were our own custom controls that contained licensed third party controls. Everything seemed to work when the controls were called from a VB executable, but when hosting them in WPF, the controls crashed if the developer license wasn’t installed on the computer.

Read the rest of this entry »