Microsoft Desktop App Converter Guide
The main idea behind the tool was to make it easier for developers to turn legacy desktop programs for Windows into Store apps.
Programs turned into apps this way would benefit from Store-exclusive features such as security sandboxing. Developers may furthermore benefit from extra exposure on Windows Store.
The Desktop App Converter that Microsoft released some time ago is still only available as a preview. The program is being worked on, and updates are released regularly that introduce new features or fix issues.
Microsoft Desktop App Converter
You may only install and run the Desktop App Converter if your computer meets the following requirements:
- Windows 10 Anniversary Update installed on Enterprise or Pro edition.
- 64-bit processor.
- Supports hardware-assisted virtualization and Second Level Address Translation (SLAT). Most modern cpus should support those.
- You may only convert installer files and not portable programs.
- Converted apps may only be deployed to 64-bit Windows devices.
Desktop App Converter Setup
First thing you need to do is download a couple of files to your system as you require them to install the Desktop App Converter on the computer. Please note that one of the files is a Windows base image that has a size of 3.3 Gigabyte.
Visit the official Microsoft download page for the Desktop App Converter. Click on the download button, and select DesktopAppConverter.zip and one of the base images. The Base Images are based on different versions of Windows. Version 14939 is the Anniversary Update version. You need to select the base image that matches your Windows version.
There is a doc file as well that you may want to download as it offers information on the tool.
Also, download the Windows Software Development Kit for Windows 10 from here. I have downloaded the Windows Standalone SDK for Windows 10, but there are others.
Extract the DesktopAppConverter.zip file once it is downloaded. I suggest you move the downloaded BaseImage file to the same directory as it makes it a bit easier during setup.
To start the setup, do the following:
- Tap on the Windows-key, type cmd.exe, hold down Shift and Ctrl, and hit enter. This opens an elevated command prompt.
- Type powershell.
- I suggest you use the cd command to go to the DesktopAppConverter directory, e.g. cd c:\DesktopAppConverter.
- Run the command: Set-ExecutionPolicy bypass
- Run the command: DesktopAppConverter.ps1 -Setup -BaseImage BaseImage-14939.wim -Verbose
Setup runs automatically from that point onward. Please note that you need to restart the PC before you can start converting programs into apps.
Windows will update during reboot, and open a PowerShell command prompt automatically when the desktop loads. Setup is then completed, and you may start using the program to convert programs to apps.
Using the Desktop App Converter
The app converter may converter legacy Win32 programs or Microsoft .NET Framework 4.61 programs to the UWP format.
Run the command get-help .\DesktopAppConverter.ps1 -detailed to get detailed information about the parameters and options that the converter supports.
To convert a program, run the following command:
.\DesktopAppConverter.ps1 -Installer C:\Installer\MyApp.exe -InstallerArguments "/S" -Destination C:\Output\MyApp -PackageName "MyApp" -Publisher "CN=publishername" -Version 0.0.0.1 -MakeAppx -Verbose
You need to adjust the command, for instance to match the program path and name of the program you want converted, the name, publisher and version. Please note that version seems to reject too short or too long versions. The compiler will throw an error if you use 0.8 or 1 in the command. Use four digits, that works, so that version 0.8 shows as 0.8.0.0 in the command.
You may get other error messages, but the messages usually point you in the right direction so that you know what went wrong.
If the command is accepted, the following happens:
- Checks are performed to make sure the environment meets all requirements.
- Checks are performed on the selected installer.
- The output directory is created if it does not exist.
- The Conversion environment is set up.
- The installer is run inside an isolated environment.
The Desktop App Converter tool creates an .appx package which is the UWP version of the program. You can run the following command on an elevated PowerShell command prompt window to test the new app before signing it:
Add-AppxPackage -Path PATHTOAppxManifest.xml -Register
Replace PATHTOAppxManifest.xml with the path to the manifest file. You find it in the same directory as the .appx package.
You may then run the app like any other using the Start Menu. Check out this guide for signing information, and issues.Advertisement