In this post I will walk you through creating a MSIX package in Windows 10 using the local Hyper-V client. For this example, I will be packaging Google Chrome.
- Windows 10 (tested with 1803 and 1809)
- Hyper-V enabled
- Google Chrome (you can download it from here)
- Code signing certificate (steps to create one from an internal PKI can be found here)
Create the MSIX Packaging Tool Environment
- From your Windows 10 client, open Hyper-V Manager and click Quick Create from the Actions pane.
- From the Create Virtual Machine dialog, select MSIX Packaging Tool Environment and click the Create Virtual Machine button. This will take some time, but it will download an image with all the tools you’ll need to create the package.
- Once the VM creation is complete, click the Connect button and start the VM. The VM will now go through the Windows OOBE.
- Once you get to the Sign in with Microsoft page, select the link Domain join instead, and add a username and password (for this demo I used msix as the username with no password).
- Finish going through the OOBE (I chose to disable Cortana and Activity History since I want this VM to be as “lean” as possible).
- When prompted to enable Enhanced Session, click Connect (set the size of the VM for best experience – I use 1024 by 768).
- Once your logged into the desktop, create a couple folders for your source files and the MSIX package (for example, C:\SourceFiles and C:\Package). Then copy and paste the Chrome MSI from the host machine into the source files folder in the VM. Also, copy your code signing certificate over to the VM.
- From the VM, launch Start > MSIX Packaging Tool.
- From the Select package type options, click Application package.
- From the Create new package page, browse to the Chrome MSI, check Specify your own certificate to sign with, browse to your code signing certificate and add the password. Once completed, click Next.
- Select Create package on this computer and click Next.
- Since we are using an MSI, you’ll notice that the application information is imported for you. You’ll also notice that the Publisher display name is imported from the code signing certificate. You may need to tweak things a bit to meet the MSIX standards – for example, in this case we need to remove the space from the Package name. Once you remove the space, click Next.
- The MSIX Packaging Tool will now prepare the VM for packaging. If it finds anything that needs attention, it will let you know it here with actions to take. Once you are finished, click Next to start the installation.
- Once the installation is complete, you’ll have the option to run any additional installers. Once you are satisfied with everything, click Next.
- From the Manage first launch tasks, this is where you would customize any post installation tasks. You can launch the executable by right-clicking the chrome.exe entry point and clicking Run. The only thing I do for Chrome is remove the desktop shortcut since I control everything else through GPO. Make any post installation customization now, click Next, and then click Yes, move on.
- For the Save location, browse to the package folder we created earlier and click Create. Once it is finished, copy the MSIX package to the host machine and you now have a MSIX package ready for deployment.