Windows Installer Tutorial

0 views
Skip to first unread message

Chloe Sarnoff

unread,
Aug 5, 2024, 2:31:05 PM8/5/24
to schorerytcu
Cansomeone help me understand how WiX works? I have a directory structure which I would like to create an installer for. I have generated the for the directory structure with heat.exe and when I build the setup project it generates an .msi file but I don't think it installs anything.

To make an update, make the necessary changes and then change the version number in that project's Properties -> Application -> Assembly Information. Then also change it in Product.wxs . Then just build your setup project again.


I maintain an open source project called IsWiX. The concept is simple. IsWiX provides additional WiX project templates (scaffolding) and graphical designers to assist you in creating installer. Then as you gain knowledge of WiX and MSI you can make additional tweaks of the WiX XML by hand and go beyond what IsWiX currently knows how to author.


After a few 'false starts' trying to learn WiX from online tutorials I noticed that on there is a link to the book "WiX 3.6: A Developer's Guide to Windows Installer XML". You can buy it pretty inexpensively in E-book form from Packt, or also Amazon if you like the easy interface with Kindle.


I found this book to be VERY helpful with every little step regarding the .msi creation process. The book will guide you to create your first .msi in the very 1st chapter! Granted, you have to continue a little more to have a fully functioning .msi, but given the complexity of Wix, this book is terrific. It may not be for the gurus among us, but for those of us who need a little more help to understand the material it's wonderful. I've seen many posts speak to the 'steep learning curve' regarding WiX and it is a complicated process to create a valid .msi, but this book goes a long way toward making that learning curve very bearable.


You can download an Ubuntu image here. Make sure to save it to a memorable location on your PC! For this tutorial, we will use the latest Ubuntu 24.04 LTS release (available on April 25th 2024) which uses the new Ubuntu Desktop installer that will be included in all future Ubuntu releases.


Insert the USB flash drive into the laptop or PC you want to use to install Ubuntu and boot or restart the device. It should recognise the installation media automatically. If not, try holding F12 during startup and selecting the USB device from the system-specific boot menu.


You will be prompted to choose between Interactive installation and Automated Installation. The interactive option is the standard route, but more advanced users can use the automated installation option to import a configuration file from a web server to standardise multiple installs and add further customisations. An example tutorial for Automated installation is available here.


You will be prompted to choose between the Default selection and Extended selection options. The default installation comes with the basic essentials to get started which you can then expand on after install using the App Center. The extended selection contains additional office tools and utilities, useful for offline situations.


In the following screen you will be prompted to install third-party software that may improve device support and performance (for example, Nvidia graphics drivers) and support for additional media formats. It is recommended to check both of these boxes.


If you select this option you will be given a simple interface that allows you to select the drive you want to install Ubuntu on and a slider to determine the amount of disk space you would like Ubuntu to use. The available space is limited by the existing contents of the disk and is designed to avoid overwriting existing files.


If your PC has multiple hard drives then this option allows you to install Ubuntu alongside an existing OS as long as they each have their own drive. Take care to ensure that you are selecting the right drive in this instance!


Manual partitioning is designed for advanced users who want to create specific configurations for their use-cases. As such we assume that these users will be comfortable with this interface and will not go into detail during this tutorial on specific setups.


Disabling Windows BitLocker is not required when fully erasing Windows or when there is a separate, unencrypted drive available for Ubuntu. For more information see the final section at the end of this tutorial.


The easiest way to do this is via the Software Updater app. Search for Software Updater via the app menu (the icon with 9 squares in the bottom corner of your window) and it will check for updates and apply them.


BitLocker Drive Encryption is a data protection feature that integrates with the Windows operating system. When activated, it will encrypt the contents of the hard drives in Windows, making the data inaccessible without the correct decryption key. It is designed to minimize the risk of data theft or exposure from lost or stolen computers.


When a user starts their computer and properly authenticates with the correct credentials, BitLocker will decrypt the data and allow seamless usage of the hard drive and the data it contains. Without the correct credentials, the encrypted hard drive data will look like random noise.


If you are not using BitLocker, Ubuntu will be able to see the correct hard drive structure, including any partitions and data stored on it. This allows the guided wizard to correctly map the data, and safely make adjustments to accommodate the additional installation of Ubuntu alongside Windows.


Decide that the data stored in Windows is not important, and that you are willing to overwrite the data contents. The Ubuntu installer can then erase the entire contents of the hard drive and create its own structure (partitions and data). This is a destructive operation, with no option to recover any Windows data.


Decide to turn BitLocker off. This will turn off the encryption feature, and the hard drive and its data will be visible and accessible from the Ubuntu installer, allowing it to correctly and safely set up a side-by-side configuration. For systems with BitLocker enabled but not yet encrypted you will need to first turn BitLocker on and then turn it off.


Note: Not all versions of Windows will allow you to re-enable BitLocker after disabling it. If you wish to re-encrypt your Windows partition after installing Ubuntu alongside it, please check that your version of Windows supports this.


Back your data up - any encryption procedure, hard drive structure change or installation of new operating systems on a hard drive that already contains data can potentially lead to a data loss. You need to make sure your personal data is safe. Even simply copying the important files to an external drive can minimize the risk of data loss.


This tutorial will guide you step by step through the creation of a simple Advanced Installer project in order to obtain an MSI package (or installer). It is addressed to those who have no previous experience in using Advanced Installer. Gain an extended knowledge of working with MSI Installers by visiting our MSI Packaging Training ebook.


Let's suppose that you want to create a package to install a simple text file, a story you wrote. Choose an already existing text file on your local disk or create one. Name the file story.txt, open it in your favorite text editor, and type a couple of lines to give it some content.


Save the project by using the [ Save ] toolbar button and choose the file name and the destination folder. This will also be the folder where your MSI package will be created. Give it an appropriate name, story.aip for this example.


Congratulations! You have created your first Advanced Installer MSI package. By default, the story.txt file will be installed in C:\Program Files (x86)\Your Company\Your Application. Browse to that folder in Windows Explorer to check.


In the Analytics Page, you can enable and configure automatic tracking of your application's installs. You get detailed information about which versions are installed more often, what is your upgrade rate, exceptions occurred during installation, OS environment details, the geographic distribution of your users base and much more.


Using the exclusive Installer Analytics, information regarding installation are available in real time. Installer Analytics will provide with really great insights on how customers use the product. It will help to improve the overall user experience and conversion rates.


Then there's absolutely no need to follow this guide, this is for installing the OctoPrint server under Windows, which is probably a rather unusual setup. If all you want is to access your existing OctoPrint instance (e.g. running on a Raspberry Pi via the OctoPi image), fire up your browser of choice and direct it to that instance's URL. Don't know what that is? Read this guide instead.


While OctoPrint's intended use case is to be installed on low-powered embedded devices with Linux, it is platform agnostic and can also be installed under Windows instead of the more common option of installing it on something like a Pi.


Make sure to disable automatic reboots for updates in your Windows configuration if you intend to run OctoPrint productively under Windows, or your prints will get interrupted by that when you least expect it.


The nature of how windows handles file access also makes it currently impossible to update OctoPrint through itself (including switching to a release candidate and back to stable). You'll need to do that through the command line, and that might become annoying quickly.


Install Python 3 from python.org.

You need a version between 3.7 and 3.11 to run OctoPrint, Choose either the x86 or x64 builds, depending on your platform or preference. DO NOT install Python 3.12, OctoPrint is not yet compatible.

When installing, be sure to include pip in the installation and also to have the installer add python to your path:

3a8082e126
Reply all
Reply to author
Forward
0 new messages