Skip to content

schaltmuffe/WixExample

Repository files navigation

Wix Toolset example

This Project basic examples on how to use wix. Examples covered here are

  • Wix MSI Builder
  • Wix Bundle
  • Custom Actions
  • WixUI
  • Harvest Directory

At each files there are comments that explain what has been done. This Readme contains some general knowledge.

ui ui ui

Components

MSI works with components. A component groups multiple resources, ensuring they are always installed or uninstalled together. This prevents inconsistencies and ensures a machine always has all the necessary parts of a feature.

In WiX, components are defined using the Component element, which contains child elements like File and RegistryValue.

References

Similar to how code is split into separate files, WiX code can be structured into multiple files for better organization and maintainability.

WiX uses references to link elements in different files. For example, the ComponentGroupRef element references a ComponentGroup with the same ID. References are typically expressed using elements ending in Ref (e.g., ComponentGroupRef, DirectoryRef) or attributes ending in Ref (e.g., BinaryRef, FileRef).

Groups

WiX provides additional structuring capabilities beyond those offered by MSI. Component groups (ComponentGroup) allow grouping components to avoid code duplication and improve organization. During the build process, all references are resolved, and components are included in the appropriate features.

Burn:

Burn is a bootstrapper that allows you to chain multiple installers, download prerequisites, and customize the user interface.

MSBuild Variable access

For commen MSBuild properties see here

$(variable_name)

Add packages

Add name to xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" element and install nuget package

Logs

To enable logging, add the following to the command line:

msiexec /i WixExample.msi /L*v yourLogFile.txt

Tasks

Fix Bug with reinstallation

When the application is uninstalled, the registry key is not removed.

File creation

Add another file to the installtion directory.

Upgrade

Create a new version of the installer and test the upgrade. Change something in win formes. Major version upgrade.

Read registry value

Read out some value from the registry and use it as a condition for a custom action.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages