Tauri applications for Windows are distributed as Microsoft Installers (
.msi files). The Tauri CLI bundles your application binary and additional resources. Please note that
.msi installers can only be created on Windows as cross-compilation doesn't work yet. This guide provides information about available customization options for the installer.
To build and bundle your Tauri application into a single executable simply run the following command:
npm run tauri build
yarn tauri build
pnpm tauri build
cargo tauri build
It will build your Frontend, compile the Rust binary, collect all external binaries and resources and finally produce neat platform-specific bundles and installers.
The Tauri CLI compiles your executable using your machine's architecture by default. Assuming that you're developing on a 64-bit machine, the CLI will produce 64-bit applications. If you need to support 32-bit machines, you can compile your application with a different Rust target using the
tauri build --target i686-pc-windows-msvc
By default Rust only installs toolchains for your machine's target, so you need to install the 32-bit Windows toolchain first:
rustup target add i686-pc-windows-msvc. You can get a full list of Rust targets by running
rustup target list.
Using a Fixed Version of the Webview2 Runtime
By default, the Tauri installer downloads and installs the Webview2 Runtime if it is not already installed (on Windows 11, WebView2 is preinstalled).
You can remove the Webview2 Runtime download check from the installer by setting
Your application WILL NOT work if the user does not have the runtime installed with this option selected.
Using a global installation of WebView2 is great for security as Windows keeps it updated, but if your end-users have no internet connection or you need a particular version of WebView2, Tauri can bundle the runtime files for you. Keep in mind that this increases the size of Windows installers by 150MB since your app will include its own copy of Chromium.
Download the Webview2 fixed version runtime from the official website, a
.cabfile for the selected architecture. In this example, the downloaded filename is
Extract the file to the core folder:
expand .\Microsoft.WebView2.FixedVersionRuntime.98.0.1108.50.x64.cab -F:* ./src-tauri
Configure the Webview2 runtime path on
tauri buildto produce the Windows Installer with the fixed Webview2 runtime.
Customizing the Installer
The Windows Installer package is built using the WiX Toolset v3. Currently you can change it by using a custom WiX source code (an XML file with a
.wxs file extension) or through WiX fragments.
Replacing the Installer Code with a Custom WiX File
The Windows Installer XML defined by Tauri is configured to work for the common use case of simple webview-based applications (you can find it here). It uses handlebars so the Tauri CLI can brand your installer according to your
tauri.conf.json definition. If you need a completely different installer, a custom template file can be configured on
Extending the Installer with WiX Fragments
A WiX fragment is a container where you can configure almost everything offered by WiX. In this example, we will define a fragment that writes two registry entries:
<?xml version="1.0" encoding="utf-8"?>
<!-- these registry entries should be installed
to the target user's machine -->
<!-- groups together the registry entries to be installed -->
<!-- Note the unique `Id` we provide here -->
<Component Id="MyFragmentRegistryEntries" Guid="*">
<!-- the registry key will be under
<!-- Tauri uses the second portion of the
bundle identifier as the `MyCompany` name
(e.g. `tauri-apps` in `com.tauri-apps.test`) -->
<!-- values to persist on the registry -->
<RegistryValue Type="string" Value="Default Value" />
Save the fragment file with the
.wxs extension somewhere in your project and reference it on
Merge element ids must be referenced on the
wix object of
tauri.conf.json on the
mergeRefs respectively in order to be included on the installer.
The Windows Installer is built using the
en-US language by default. Internationalization (i18n) can be configured using the
tauri.bundle.windows.wix.language property, defining the languages Tauri should build an installer against. You can find the language names to use in the Language-Culture column on Microsoft's website.
Compiling an Installer for a Single Language
To create a single installer targeting a specific language, set the
language value to a string:
Compiling an Installer for Each Language in a List
To compile an installer targeting a list of languages, use an array. A specific installer for each language will be created, with the language key as a suffix:
"language": ["en-US", "pt-BR", "fr-FR"]
Configuring the Installer for Each Language
A configuration object can be defined for each language to configure localization strings:
localePath property defines the path to a language file, a XML configuring the language culture:
<String Id="LaunchApp"> Launch MyApplicationName </String>
A newer version of MyApplicationName is already installed.
Add the install location of the MyApplicationName executable to
the PATH system environment variable. This allows the
MyApplicationName executable to be called from any location.
Culture field must match the configured language.
Currently Tauri references the following locale strings:
InstallAppFeature. You can define your own strings and reference them on your custom template or fragments with
"!(loc.TheStringId)". See the WiX localization documentation for more information.