Convert Windows Desktop App to Universal Windows App

Converting Desktop Apps to UWP with Windows 10
Microsoft is introducing a capability with the Anniversary Update for Windows 10 that allows for the transformation of conventional Windows desktop applications into Universal Windows Platform (UWP) applications.
This conversion process isn't limited to developers; any user can utilize this feature for any application they possess.
How the Conversion Works
The Windows 10 converter accepts either a .msi or .exe file as input. Upon processing, it generates a .appx package.
This .appx package can then be sideloaded onto a personal computer for testing and use.
Distribution Options
For developers of the original application, the resulting UWP app can be submitted to the Windows Store for wider distribution.
The availability of this feature will coincide with the release of the Windows 10 Anniversary Update, potentially bringing a significant number of previously unavailable "legacy" applications to the Windows Store.
This represents a substantial expansion of the Windows Store's catalog and offers users greater access to a diverse range of software.
The Benefits of Application Conversion
Project Centennial, a Microsoft initiative, culminated in this capability, aiming to integrate traditional Win32 and .NET Windows desktop applications into the Windows Store and the Universal Windows Platform (UWP).
The rationale behind transforming a desktop application into a UWP app may not be immediately apparent. However, a key advantage lies in the exclusivity of the Windows Store to UWP applications.
Expanding Reach and Simplifying Updates
This conversion enables developers to significantly broaden the audience for their software. Furthermore, it provides users with benefits such as streamlined, one-click installation processes, simplified purchasing options, and automated updates.
While the UWP platform typically employs a sandboxed environment for security, applications converted through this process retain full system access. They function with the same permissions as conventional desktop applications.
According to Microsoft’s official documentation, the converted app operates as a UWP application while maintaining its original capabilities. It interacts with a virtualized system view that mirrors the actual registry and file system, offering a seamless experience.
Understanding the Constraints
Related: A Guide to Enrolling in the Windows Insider Program and Evaluating Upcoming Features
Several key limitations apply to this process. Initially, functionality is restricted to systems running the Windows 10 Anniversary Update. Currently, compatibility extends to Windows 10 Insider Preview build 14316 and subsequent versions, necessitating participation in the Windows Insider program and utilization of a corresponding Insider Preview build.
Furthermore, the Professional or Enterprise editions of Windows 10 are required for this feature. Users of Windows 10 Home will be unable to leverage the Desktop App Converter. While initially available solely for Windows 10 Enterprise as of build 14316, support for Windows 10 Professional is being implemented. Presently, the tool operates exclusively on 64-bit Windows installations, and the generated AppX package is also limited to 64-bit Windows environments. Future Insider builds are expected to address this restriction.
The applications produced through this conversion are specifically designed for Windows 10 PCs. They are not compatible with Windows 10 Mobile smartphones, the Xbox One console, HoloLens devices, Surface Hubs, or other Windows 10 platforms that support UWP apps.
However, developers have an avenue to adapt their desktop applications for broader cross-platform UWP compatibility. Microsoft states that complete migration of an app’s functionality from the full-trust partition to the app container partition will enable operation across all Windows 10 devices.
Certain application behaviors are not supported during conversion. Applications cannot necessitate administrative privileges or employ other forms of low-level system access. A comprehensive list of unsupported behaviors is maintained by Microsoft.
Additional Considerations
- The Desktop App Converter is a tool for packaging traditional Windows applications as UWP apps.
- It allows developers to bring existing Win32 applications to the Windows Store.
- Ongoing development aims to expand compatibility and functionality.
Setting Up the Desktop App Converter
For users with a recent version of the Windows 10 Insider Preview, the Desktop App Converter can be obtained from Microsoft’s Developer site. Both the DesktopAppConverter.zip archive and the BaseImage-14316.wim file should be downloaded.
Extract the contents of the downloaded DesktopAppConverter.zip file into a designated folder on your system. Subsequently, place the BaseImage file within this same directory. Note that if a newer Windows 10 build is available, a corresponding updated BaseImage file will be present; ensure you utilize the version matching your installed Windows 10 build.
Prerequisites
The Windows 10 SDK must also be downloaded and installed prior to proceeding.
Next, launch a PowerShell window with administrative privileges. This can be achieved by opening the Start menu, searching for "PowerShell," right-clicking the application shortcut, and selecting "Run as Administrator."
The PowerShell execution policy needs adjustment. Execute the following command to modify it, and confirm the change by typing y when prompted.
Set-ExecutionPolicy bypass
Navigate to the directory containing the extracted Desktop App Converter files using the command below, substituting C:\Users\NAME\Downloads\DesktopAppConvertor with the actual path on your computer:
cd -Path C:\Users\NAME\Downloads\DesktopAppConvertor
Initiate the Desktop App Converter setup process by executing this command:
.\DesktopAppConverter.ps1 -Setup -BaseImage .\BaseImage-14316.wim
Should a reboot be requested during the execution of any of these commands, restart your computer and then rerun the command.
Transforming Desktop Applications
The DesktopAppConverter.ps1 script, executed from an elevated PowerShell prompt, facilitates the conversion of a traditional desktop application into a Universal Windows Platform (UWP) application with a single command. This process necessitates access to the application’s installation file.
VLC serves as a practical example to illustrate this conversion procedure.
A comprehensive listing of available options can be accessed by executing the following command:
get-help .\DesktopAppConverter.ps1 -detailed
This command provides detailed information regarding the script’s functionalities.
Below is a sample command, adaptable for your specific application:
.\DesktopAppConverter.ps1 -ExpandedBaseImage C:\ProgramData\Microsoft\Windows\Images\BaseImage-14316–Installer C:\Installer\MyApp.exe -InstallerArguments "/S" -Destination C:\Output\MyApp
-PackageName "MyApp" -Publisher "CN=<publisher_name>" -Version 0.0.0.1 -MakeAppx -Verbose
Remember to customize this command with your application’s details, including the publisher name, version, package name, installer file path, and desired output directory.
The -InstallerArguments "/S" parameter transmits the /S switch to the installer, enabling silent installation for many applications. Successful conversion requires applications capable of installation without requiring user interaction.
To ensure accurate packaging, the application installer should reside in a dedicated directory, free from extraneous files. Any files present in the installer’s directory will be included within the generated .appx package.
Considering VLC as our example, the corresponding command would be:
.\DesktopAppConverter.ps1 -ExpandedBaseImage C:\ProgramData\Microsoft\Windows\Images\BaseImage-14316–Installer C:\Users\chris\Downloads\vlc\vlc-2.2.2-win32.exe -InstallerArguments "/S" -Destination C:\Output\VLC
-PackageName "VLC" -Publisher "CN=VideoLAN" -Version 0.2.2.2 -MakeAppx -Verbose
Upon completion, the tool generates an .appx package, representing the UWP version of the application.
The conversion process results in a deployable UWP package.
This package can then be installed and utilized as a standard UWP application.Installing Applications Without a Signature
Typically, application installation necessitates a valid signature. Microsoft suggests generating a self-signed certificate and utilizing it to sign the application on your system. Detailed instructions for this process are available if desired.
However, for installations intended solely for personal use, a more streamlined approach exists, bypassing the need for signatures. Windows 10 permits the installation of "unpackaged" applications directly from a folder.
Initiate this process by opening a PowerShell window with Administrator privileges. Then, execute the following command:
Add-AppxPackage -Path C:\Path\to\AppxManifest.xml -Register
The AppxManifest.xml file is located alongside the Application.appx file within the designated output directory.
Following successful execution, the application will be accessible through your Start menu. While categorized as a "Windows app" rather than a "Desktop app," its functionality and appearance will remain consistent with standard desktop applications.

Signing and Installation Procedures
If the application is already installed on your system, these instructions are unnecessary. This method represents a more complex installation pathway.
Typically, successful installation of an .appx package requires a valid digital signature. Microsoft’s recommendation involves utilizing the signtool.exe application, which is included within the Windows 10 SDK, to generate a self-signed certificate. This certificate enables installation and testing of the application on your personal computer.
To proceed, launch a Command Prompt window with Administrator privileges and execute the following commands. These commands will create a self-signed certificate and subsequently sign the .appx package:
Command Sequence
cd "C:\Program Files (x86)\Windows Kits\10\bin\x64"MakeCert.exe -r -h 0 -n "CN=Publisher" -eku 1.3.6.1.5.5.7.3.3 -pe -sv my.pvk my.cerpvk2pfx.exe -pvk my.pvk -spc my.cer -pfx my.pfxsigntool.exe sign -f my.pfx -fd SHA256 -v C:\Path\to\application.appx
It’s crucial that the publisher name specified – represented by "CN=Publisher" – aligns precisely with the publisher designated during the AppX file creation. For instance, referencing the VLC example, "CN=VideoLAN" would be the appropriate designation.
A password prompt will appear during the signing process. Leaving this field blank is permissible.
The .appx package can then be installed using the Add-AppxPackage command within a PowerShell window running as Administrator:
Add-AppxPackage C:\Path\to\application.appx
While this functionality is accessible to all users, it is primarily intended for developers and potentially system administrators. Fortunately, the process is streamlined and relatively straightforward for those with development expertise.