[RELEASED] Windows Installer for Unity - Easily create an .msi installer for your Unity application

Easily create a Windows Installer (.msi) package for your Unity application.

Windows Installer for Unity | Documentation

Description

  • Create an .msi package automatically after each build
  • No knowledge of Windows Installer Technology needed
  • Requires minimal configuration - Build your own installer within minutes
  • Easy customization - Create professional looking installers
  • Developed with build automation in mind
  • Scripting access for easy integration in your own build pipeline

Features

  • Customizable User Interface - Add your own logo and a custom background on welcome and exit screens
  • Specify your own License Agreement / EULA
  • Allow the user to configure the installation directory
  • Allow the user to create a desktop shortcut
  • Create localized installers by choosing from 38 language to better reach your target audience

Screenshots

FAQ
Does my application need an installer?
The truth is, most traditional Unity applications wonā€™t need one. For gaming applications, you will probably end up uploading to a store like Steam, which already handles packaging and distribution.

Having an installer is mostly useful for enterprise applications, which are nowadays increasingly created with Unity.

You can read more about the benefits of MSI for this use case here.

Does having an installer remove the Windows Security popup that can appear when running a Unity application on a different computer?
Having an installer does not solve the issue that Microsoft SmartScreen might notify its users with a message that your app is potentially unsafe. The general advice on how to solve this is, that you should both:

  • Code-sign your application by purchasing a certificate from a Certificate Authority.
  • Get your application out to enough users so SmartScreen eventually considers it safe.
    (According to this thread , the message can still pop up even when youā€™ve code-signed your application. So it seems signing alone is not enough.)

Technical Details

General

  • This asset is distributed as an embedded package in Packages/com.doji.wix/

Platforms

  • Windows Installer is a technology thatā€™s specific to the Windows platform. As such, it is only available for the ā€˜Windows Standaloneā€™ build target

Prerequisites for development/build environment:

(The asset includes a wizard, making the process of installing these prerequisites a breeze!)

Limitations:

  • Single self-contained .msi files are only supported up to a size of 2GB. Larger installers can be created, but will result in an installer package that consists of more than a single file. For more information see here.

Known Issues

  • If you are using the latest .NET 8 make sure to update to the latest version of this asset. Older versions do not support .NET 8

Feedback and constructive comments are very welcome!

2 Likes

Look great! Definitely getting it soon.

few questions,
if user runs updated installer next time, does it remember the correct folder? (to overwrite old version)
Does the installer still give the regular unknown app warning?
Do you know if msi installer triggers virus false positives more easily compared to plain full exe?
Would it be possible to setup it as a web installer? (it downloads content from url or something)

1 Like

Hey, @mgear , thanks for your interest. These are great questions! :slight_smile:

Prompting the user for a custom folder during installation is currently not supported. The application will always be installed in Program Files (Program Files (x86) in case youā€™re doing a 32 bit build), so itā€™s always the same folder. But I can see how customizing the install location would be valuable. Iā€™ve focused on silent installs for the first release, but I will definitely consider adding the ability to simply enable certain standard UI components (e.g. license texts or the custom install locations you mentioned).

As far as Iā€™m aware, having an .msi installer changes nothing in regards to Windows telling a user when they are executing a file that comes from untrusted sources as outlined here . As outlined in the post you should sign your application. You could argue that when you use an .msi installer youā€™re in an even worse position, because now you technically have to sign both the installer as well as the main executable.

Thatā€™s an interesting question. There is currently no built-in support for downloading content during installation. I will explore whether thatā€™s something that could be easily added. My gut feeling is, that if you want to have a small base application with potentially large amounts of content loaded in afterwards on demand, you might be better off using something like Unityā€™s Addressable Asset System.

A small update is available that fixes some minor issues.

v1.0.1 (March 30, 2022)
Fixed: 64 bit applications are now correctly installed to %programfiles% and 32 bit applications to %programfiles(x86)%.
Fixed: ā€œOpen Documentationā€ now actually opens the online documentation in the browser.
Changed: The default installer name now contains the architecture it was built for.

one more question,
would it be possible to place company logo or some image in the installer window?

(not critical at all, but you know how customers/managers like that kind of things : D

1 Like

No worries, I fully agree and this is valuable feedback :slight_smile:
Iā€™m currently working on the customizable UI which lets you add your own images, (as well as a license text and the user-controlled install directory). Should have something to show end of this week, hopefully live on the Asset Store next week. Stay tuned!

1 Like

Hereā€™s a little preview of what the installer UI will look like once customized.
[EDIT: Images moved to original post ]

New version should be up at some point next week.

Nice! yeah license field is very much appreciated also.

The new update is now live on the Asset Store.

v1.1.0 (April 1, 2022)

  • Added an installer UI that guides the user through the installation, which can be enabled on demand and configured through the settings window.
  • Added the option to customize the UI by providing your own images.
  • Added the option to show an end user license agreement that the user has to accept in order to install the application.
  • Added the option to allow the user to change the installation directory.
  • Updated the settings window to show more useful information about the project data that is used to generate the installer (e.g. Company Name, Product Name and Version from PlayerSettings). It also allows to overwrite some of these values if necessary.

A new update is available in the Asset Store!

v1.2.0 (April 11, 2022)

  • Added: If an icon for the application has been set in the PlayerSettings (Project Settings ā†’ Player), it will automatically be used as the icon that is displayed for the application in ā€œAdd/Remove Programsā€.
  • Fixed: The ā€œPackage Nameā€ and ā€œManufacturerā€ property could display stale information in certain cases.
  • Fixed: Overriding the ā€œManufacturerā€ property" could throw errors in certain cases.

A new version has been released.

v1.3.0 (May 3, 2022)

  • Added: Desktop Shortcuts. The installer UI can now be configured to show a dialog where the user is able to choose, whether a desktop shortcut should be created during installation. Alternatively, a desktop shortcut can also be created without requiring user permission.

A new update is available in the Asset Store!

v1.4.0 (May 5, 2022)

  • Added: Localization / Multi-Language Installers. The installer UI can now be configured to use a specific language out of 38 languages to choose from.
1 Like

A new update is available in the Asset Store!

v1.5.0 (May 20, 2022)

  • Added: The option to create an uninstall shortcut inside the install directory.

Hey @juienkay Iā€™m interested in purchasing this, but have a few questions that I didnā€™t see answered.

If I publish an update for my app, when they download the updated msi file, will that correctly overwrite the previous version? My app is small, so when thereā€™s an update available, I just automatically download and open the new installer file.

Iā€™ve been using InnoSetup, but Iā€™m looking for a solution thatā€™s a bit more integrated into the Unity pipeline.
Does the version number match the unity app version number, or does that need to be set manually?

Thanks!

1 Like

Hey @JudahMantell , thanks for your interest! :slight_smile:

Yes, the default behaviour is, that new versions will overwrite previously installed versions. All you have to do is increment the version number in Unity. So yes, the installer just uses the Unity version number.

Yes, thereā€™s a setting to automatically create an installer each build. You can also kick off the process from script in case you use custom build scripts of your own and only want to do that for release builds. (More on that here)

Awesome, Iā€™m going to purchase it soon!

ā€¦This might be a stretch, but I figured it wouldnā€™t hurt to ask: You wouldnā€™t have something in the works for MacOS too, would you?

My current pipeline for Mac/PC deployment is to develop and build on PC, transfer the project to Mac, build, and package, then transfer it back to the PC for pushing to the web server. Kinda a nightmare, and Iā€™m looking for any way to streamline the whole process.

1 Like

Yeah, sorry I donā€™t have anything planned in that regards. I actually assumed Unity allows to do a Mac build completely from PC. But then again, Iā€™ve never developed for Mac, so Iā€™m really the wrong person to ask.

1 Like

Hi @SDC2X ,

it seems that some of the prerequisites are not yet set up. Did you follow the instructions here to install WiX on your machine? The wizard should automatically pop up when first importing the asset leading you through the installation.

EDIT: For future reference, if the above error appears, restarting your machine should fix the issue.

A new version has been released.

v1.6.0 (June 29, 2022)

  • Added: Support for installer packages larger than 2GB.
  • Fixed: Desktop shortcuts could be created in cases where they shouldnā€™t be, i.e. even if the associated property in the settings windows had been set to ā€˜Donā€™t createā€™.

This is really handy to get us started! We have a fairly specific used case, so I am currently trying to make modifications to the plugin ourselves, but the two features we are missing so far:

WiX in a custom directory: Remove all hardcoded Assets/Wix/ paths

Skip company name in default install directory - just one directory in program files

Custom binary name - rather than it being explicitly the application name + .exe, specifying it as a function argument, and storing it in BuildInfo

Permissions - our application has a self-updater, but after the installation is complete, it doesnā€™t have write permissions to the directory so it canā€™t update itself

Add registry entry - allow us to set up deep linking for our tool automatically

1 Like