Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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

Discussion in 'Assets and Asset Store' started by julienkay, Mar 25, 2022.

  1. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hello, how are things going in this direction? Right now I'm just considering your plugin as an alternative to the self-written exe installer.
     
    julienkay likes this.
  2. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Hey, thanks for your interest.
    Which are the features that are missing for your use case? Custom URL schemes, or setting install directories other than ProgramFiles?
     
  3. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hi, I am interested in both features. I want to be able to customize the URL scheme and also be able to set the installation path /AppData/MyApp.
     
  4. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Sorry for the late reply. These will make it into the next version, which is expected to be released by the end of next week.
     
  5. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hello, great news! Looking forward to the update.
     
  6. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v1.8.0 (May 17, 2023)
    • Added: The option to close running instances of the application during uninstall.
    • Added: The option to choose AppData folders as the default install location.
    • Fixed: Building an installer with the target directory of a build on a different drive than the Unity project could result in an error in certain cases.
    • Fixed: Building an installer could fail when no valid custom UI images had been assigned.
     
  7. karol_highrise

    karol_highrise

    Joined:
    Dec 8, 2022
    Posts:
    1
    Is it possible to set it up on Unity Cloud Build?
     
    julienkay likes this.
  8. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    It should work, but maybe there is some manual work to be done to make sure the required software is installed on the build server.
    I had never tested it, but I just saw that Unity reintroduced a free tier for Cloud Build recently. So I'll take a look and report back with the results.
     
  9. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v1.8.1 (July 03, 2023)
    • Fixed: Fixed an issue with creating the application icon when the global texture mipmap limit was set to a value other than 0.
    • Fixed: Improved compatibility with Unity 2023.
     
  10. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hi, how about the ability to add custom url schemes? And is it possible to specify application startup arguments after installation?
     
  11. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Hey, sorry for the delay. The new version adding custom URL schemes should be up within a few days.
    Then, when opening the app through an URL, that URL itself gets passed as a command line parameter to the application.
     
  12. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hey, good news about custom URL schemes, I'm looking forward to it.
    I'll try to clarify my second question. Is it possible to make the application automatically start with arguments after installation, for example, pass the name of the installation file "my_app.exe -installername my_instller.msi"? I use this data for statistics that my application sends.
     
  13. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    For getting information related to the installation at runtime, I think command line arguments are not suitable. They're mostly useful for passing configurations to an application. You can create shortcuts or batch files with specific arguments of course, but it seems that's not what you're after. If you want access installation-related data afterwards, this would best be done by actually writing to a file or the registry during installation.

    What's the goal you're trying to achieve? Do you want to know whether the application was installed through an .msi installer vs. through other means?
     
  14. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    This is necessary in order to link the user who downloaded the installer on the site with the user who launched the installed application in statistics. Let me tell you how it works for us now. When downloading the installation file, the GA ID (google analytics identifier on the site) is dynamically substituted in its name. It turns out something like installer_23423423234.234234234.exe. Further, after the installation is completed, the name of the installation file is passed as a launch argument to our application, and the application already sends this identifier to the analytics. Thus, we understand that the user who downloaded our application also successfully installed and launched it.
     
  15. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v1.9.0 (July 2, 2023)
    • Added: Added support for custom URL protocols (deep linking).
    • Fixed: Fixed editor performance issue on Windows 11.
     
  16. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hi, why do I see this during installation?
    upload_2023-7-27_18-7-31.png
     
    julienkay likes this.
  17. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    This seems to be an issue with Windows Installer itself.

    There might be a workaround by adding
    Code (CSharp):
    1. writer.WriteStartElement("UIRef");
    2. writer.WriteAttributeString("Id", "WixUI_ErrorProgressText");
    3. writer.WriteEndElement();
    in WxsBuilder.cs line 70, but I have to verify that first since it only appears to happen on certain OS versions.
     
  18. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Thanks, this code helped to hide it.
    The system on which this repeats for me:
    OS Name Microsoft Windows 11 Home Single Language
    Version 10.0.22621 Build 22621
     
  19. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v2.0.0 (October 18, 2023)
    • Added: Support for Unity Build Automation (formerly Cloud Build).
    • Changed: Switched to distribution as a package.
    • Changed: WiX.InstallWix() now installs silently by default.
    • Fixed: Fixed progress text not being formatted correctly on certain systems.
    I opted to make this a major release since I consider the move to being distributed as a package a breaking change.

    More documentation on Cloud Build in the coming weeks.
     
    Last edited: Oct 24, 2023
  20. ExcellencyHong

    ExcellencyHong

    Joined:
    Aug 9, 2016
    Posts:
    33
    hi, i don't using yet your installer after purchased. since i'll have a oppotunity to use your installer, so i have a question.
    is it possible to include others required dependency installation before main installation? for example, such as .net runtime or VC++ redistribution.
     
    julienkay likes this.
  21. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Hey @ExcellencyHong, thanks for reaching out.

    The short answer is, that this is not supported.

    The longer answer: Distributing dependencies like .NET Runtime or VC++ Redistributable requires creating an installer that bundles any third-party installers along with your own application files. In theory, this is possible to do with WiX, which this asset is based on (more info here), but in that case, your installer will be in the form of an .exe installer, not an .msi.

    This assets main focus is to provide support for MSI installers specifically (mostly useful in scenarios where this is a requirement due to deployment in enterprise environments).

    For .exe installers, there are free tools like InnoSetup, that could be used for this, so I currently don't have any plans to add support for this.
     
    Last edited: Oct 23, 2023
  22. ExcellencyHong

    ExcellencyHong

    Joined:
    Aug 9, 2016
    Posts:
    33
    i'm understand. thanks!
     
  23. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v2.0.1 (October 24, 2023)
    • Fixed: Fix Custom Background and Banner Images not being used by default on new projects.
    • Fixed: Fix WiX UI and Util extensions failing to install during Cloud Build.
     
  24. neoRiley

    neoRiley

    Joined:
    Dec 12, 2008
    Posts:
    162
    @julienkay I've read through these threads and sent an email about it, but thought to post here in case anyone else comes across with this question :

    I'm going to purchase it right now, but wondered if you could point me to information about the signing of the application? I saw in one of your responses something about having to sign both my application and the installer package - is that correct? If so, that's the information I'm interested in. This is the first time I've had to code sign an app and create an installer, so there's this learning curve

    [Another question]: I've read that you can sign both the exe and the MSI package - does your plugin accommodate that with the editor panel? ie: if you want it to build and create the MSI all in one step, would it be possible to sign both the exe and the installer?

    Thanks for any and all help,
    John Grden
    N30R1L37
     
    Last edited: Nov 12, 2023
    julienkay likes this.
  25. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Signing the application is required only if you want to get rid of the "Windows protected your PC message" that is displayed when running apps from unknown publishers. It also enables your users to ensure they are running official software authored by your company using a digital signature.
    Here's more information on using signtool and creating a test certificate
    For release, you'll need to purchase a code signing certificate though.

    The asset doesn't handle code signing. It's integrated into the Unity build pipeline though, so you can easily do a custom build step before/after creating the MSI installer to do the signing. But not from the UI, no.
     
    Last edited: Apr 24, 2024
  26. neoRiley

    neoRiley

    Joined:
    Dec 12, 2008
    Posts:
    162
    Ok great and thank you for the quick response! After reading every thing else I could find, this was the conclusion I'd come to, and I really appreciate you confirming - I'll be making builds today :)
     
  27. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v2.0.2 (December 06, 2023)
    • Fixed an issue that prevented users of .NET 8 to correctly install WiX and the required extension.
    • Fix msi path not being available in build summary window.

    Important notes for existing users and anyone updating their system to use the recently released .NET 8:
    • .NET 8 is supported starting with v2.0.2
    • When updating Windows Installer for Unity to v2.0.2 you will be prompted to upgrade WiX Toolset. Up until now, we targeted a pre-release version of wix (v4.0.0-preview.0). From v2.0.2 onwards, the target version is the latest release v4.0.3. If you're on .NET 8 this is required, otherwise optional but still recommended.
    wix_update.jpg
     
    Last edited: Dec 8, 2023
  28. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v2.1.0 (February 07, 2024)
    • Added: Add the option to specify a custom .ico file as the product icon.
    • Fixed: Debug Symbols (.pdb files, Burst & IL2CPP Debug folders) are ignored by default and will not be included in the installer.
    • Fixed: Fixed incorrect install path on Cloud Builds.
    • Fixed: Fixed issue that resulted in grey shortcut icons when creating installers on certain machines.
     
  29. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    PSA: When upgrading from older versions I recommend removing the old version of the package completely, before installing the new one. (You can keep the WiXSettings file, so all your settings will still be there).

    This is generally advisable for any package update, because Unity does not handle moved/renamed assets correctly, which causes issues specifically with the latest v2.1.0 update.
     
    Last edited: Mar 22, 2024
  30. Przemek100

    Przemek100

    Joined:
    Jul 17, 2021
    Posts:
    1
    I just purchased Installer for macOS arm64 . I was prompted to install .NET 8 I got NET version for macOS arm64. Unfortunately after installation of NET it didn't jump to next the window in WIX installation wizard, also Windows->WIX->WIX for Unity Wizard is grayed out and following error keeps popping up. I restarted all few times. Can you help to resolve this issue, please.
    I use 2021.3.2fc1 Unity

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ComponentModel.Win32Exception: ApplicationName='CMD.exe', CommandLine='/C dotnet --list-sdks', CurrentDirectory='', Native error= Cannot find the specified file

    In your code CmdLineUtil the app is trying to open CMD.exe which obviously doesn't exist in MacOS therefore it can't see SDK lists. It is possible to make a version for macOS.?
     
    Last edited: Apr 5, 2024
  31. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    Hey, sorry to be the bearer of bad news, but unfortunately the asset is Windows-only.
    You may want to contact Unity for a refund.
     
  32. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    WiX v4 which is used to create the msi installer does not support MacOS, so it's not possible at this time.
     
  33. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172
    A new version has been released.

    v2.2.0 (April 24, 2024)
    • Added: Add the option to create a start menu shortcut.
    • Added: Expose UpgradeCode to allow setting it from a build script.
    • Fixed: Add missing chinese translations to ShortCutsDlg.
     
  34. yonson_chappers

    yonson_chappers

    Joined:
    Feb 6, 2017
    Posts:
    34
    Hi I've purchased this but can't get it working - specifically 'install WiX' fails with the following error, could you help please? Running it on Unity 2021.3.29. Thanks!

    upload_2024-5-7_16-14-34.png
     
    julienkay likes this.
  35. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    172