Microsoft Ignite 2016 1/5/ :32 AM

Slides:



Advertisements
Similar presentations
Andrew Hennessy Automating Server Application migrations to the Cloud – Goodbye Server INF21 3.
Advertisements

Kevin Francis Developing on Windows Devices ARC33 2.
Michael Niehaus Using the Windows Store for Business: New Capabilities for Managing Apps in the Enterprise WIN335.
Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227.
Orin Thomas 30 Bad Habits of Server Administrators INF32 3.
Building a Microservices solution using Docker,
Microsoft Virtual Academy Talbott Crowell | Chief Architect, ThirdM.com Rob Latino | Program Manager in Office 365 Support, Microsoft.
A deep dive into Azure AD B2C
3 Ways to Integrate Business Systems to Partners
Azure ARM Templates CLD321 Aaron Saikovski
Serverless in Office 365 Build services with Azure Functions
Making of the Ignite Bot
What's New in System Center Configuration Manager, Current Branch and Intune INF324a Steven Hosking.
30 Tips and Tricks for Managing and Running Ubuntu/Bash/Windows Subsystem for Linux WIN321B Orin Thomas.
Malware Incident Response
Introduction to ASP.NET Core
5/3/2018 2:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS.
The Zen of Package Management
Microsoft Virtual Academy
5/15/2018 5:43 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Conversation As a Platform - Part 1
Customizing Windows 10: Image Creation Tips and Tricks
Now, let’s implement/trial Windows Defender Advanced Threat Protection
Microsoft Virtual Academy
Using Azure Key Vault for Encrypting and Securing your Cloud Workloads
Microsoft Virtual Academy
Techniques and Practices for Testing Angular
Windows Developer Day Fall Creators Update October 10, 2017.
Microsoft Ignite /19/2018 2:35 AM
Need for Speed: Why Applications With No Database and No Services are Fast ARC334 Nick Randolph – Built to Roam.
Building a Continuous Delivery Pipeline for ASP.NET Core Apps
Jenkins and Azure OPEN322 Michael Friedrich.
Microsoft Ignite /18/2018 8:30 PM BRK2065
Microsoft Build /13/2018 2:24 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Desktop App Converter (Project Centennial)
Modernizing App Experiences
Darren Neimke and Jonathan Ruckert
Microsoft Build /8/2018 8:41 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Developing and Supporting Apps in Windows as a Service (WaaS)
Build vNext in VSO and TFS 2015
What’s new in Visual Studio in 2015?
Microsoft Virtual Academy
Microsoft Edge for Developers
Rob Farley, LobsterPot Solutions
Bring existing desktop apps to UWP with the Desktop Bridge
Monetize your app using Windows Store monetization platform
Microsoft Build /24/2018 4:02 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Hosted Web Apps with Windows App Studio
Version Binding UWP Apps & Driver Packages
Application Insights:
A/B Testing for UWP Apps: Experiment for Success
Modern cloud PaaS for mobile apps, web sites, API's and business logic apps
Bare Metal Development for the Universal Windows Platform
Microsoft Virtual Academy
12/9/2018 Desktop Virtualization Corey Hynes Kyle Rosenthal President Technical Lead HynesITe Inc Spider Consulting @windowspcguy.
Microsoft Virtual Academy
Microsoft Connect /31/2018 7:21 AM
Microsoft Ignite /2/2019 1:15 AM Power Up Your Cross Platform Mobile Code with Platform Specific Features using Xamarin Alec Tucker MOB331 © 2015.
Bringing desktop apps to the UWP using Desktop App Converter
The Power of a Great API Damian Brady
What is Visual Studio Code?
Microsoft Virtual Academy
Deep Dive into Azure API Apps and Logic Apps
Jonathan Ruckert & Darren Neimke
UI test automation of MVC apps with Microsoft Edge WebDriver
5/3/2019 Desktop Virtualization Corey Hynes Kyle Rosenthal President Technical Lead HynesITe Inc Spider Consulting @windowspcguy.
Empower your users with Azure Active Directory Premium
Securing ASP.NET in an Azure Environment
Microsoft Virtual Academy
Presentation transcript:

Microsoft Ignite 2016 1/5/2018 12:32 AM Bring Your Win32 Apps to the UWP Ecosystem and the Windows Store using Project Centennial NET335 Alec Tucker © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Centennial Intro Conversion Process 1/5/2018 12:32 AM Agenda Centennial Intro What it is and what it’s not Why? How? Conversion Process Prerequisites Walkthrough and demo Problems and pitfalls – what won’t convert and how can you handle it? © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Centennial Intro What it is What it isn’t A bridge from Win32 to UWP 1/5/2018 12:32 AM Centennial Intro What it is A bridge from Win32 to UWP It will convert your Win32 app (MSI) to an Appx What it isn’t A source code converter. It will not convert any of your source. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/5/2018 12:32 AM Why? Estimated 16M existing windows apps, representing an enormous code investment Win32 had no app model to speak of - no concise definition of an app Consisted of exe, dll, registry entries, files No guaranteed clean uninstall The new app model is contained and cannot break anything Move to the Store to get Store features Payment options Updates Run everywhere Xbox Surface Hololens © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Why? Installation experience 1/5/2018 12:32 AM Why? Installation experience MSI: Download, double click, install wizard, next, next, wait, wait, … No clean (and complete) uninstall New: Store download (or sideload), one click, check progress Auto update and install Smart download Confidence We want users to have confidence they can try our app without adverse consequences They should believe (correctly) that they can install, try, change their minds and uninstall without issue © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/5/2018 12:32 AM How? Run through your MSI installation one last time using the converter The installation will be monitored with all details captured and used to create an appx installation – fully self contained. This will include all registry entries created and all files copied. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Virtualisation Registry Access File System Access 1/5/2018 12:32 AM Virtualisation Registry Access Calls to read from and write to the registry are intercepted Your app thinks it’s working with the registry as before File System Access The same applies to files expected to be in certain locations © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Considerations Registry Access Think of it as the good bits of win32 1/5/2018 12:32 AM Considerations Registry Access Think of it as the good bits of win32 Centennial will embrace your app, but not your bad habits… If you implement an NT Service or rely on elevated permissions you’ll hit problems © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Walkthrough Microsoft Ignite 2016 1/5/2018 12:32 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Prerequisites Windows 10 Anniversary Update 1/5/2018 12:32 AM Prerequisites Windows 10 Anniversary Update Pro or Enterprise The Desktop App Converter tool https://www.microsoft.com/store/apps/9nblggh4skzw The base windows image Used as a container to generate the AppX package BaseImage-14393.wim, approx 3.3GB http://aka.ms/converterimages Windows 10 SDK 14393 https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Process Launch app with admin rights 1/5/2018 12:32 AM Process Launch app with admin rights You’ll recongnise a Powershell command prompt Bypass standard Windows execution policies PS C:\> Set-ExecutionPolicy bypass Then install the base image (this will take a while, and involve a reboot) PS C:\> DesktopAppConverter.exe –Setup –BaseImage “.\BaseImage-14393.wim” –Verbose The process relies on a Windows 10 feature (Containers) that’s not installed by default. If it’s missing, this will take care of installing it. Once this has completed, you’re ready to start © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Process Converting an MSI The MSI being used is available here: 1/5/2018 12:32 AM Process Converting an MSI The MSI being used is available here: https://github.com/qmatteoq/DesktopBridge/blob/master/1.%20Desktop%20App%20Converter/HelloCentennial.msi …and for reference, the corresponding source is here: https://github.com/qmatteoq/DesktopBridge/tree/master/1.%20Desktop%20App%20Converter/HelloCentennial The code is very simple. It contains a button which creates a text file on the desktop when it’s clicked, as follows: private void OnCreateFile(object sender, EventArgs e) { string userPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); string fileName = $"{userPath}\\centennial.txt"; File.WriteAllText(fileName, "This file has been created by a Centennial app"); } © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Process Execute the following command: 1/5/2018 12:32 AM Process Execute the following command: DesktopAppConverter.exe -Installer "C:\Installer\HelloCentennial.msi" -Destination "C:\Output\HelloCentennial" -PackageName "HelloCentennial" -Publisher "CN=<publisher_name>" -Version "1.0.0.0" -MakeAppx -Verbose –Sign -Installer contains the path to the MSI being converted -Destination is the folder where the output will be saved -PackageName is as it sounds – the name to give the package -Publisher – for test purposes this can be anything, as long as it starts with “CN=“ and contains no spaces. -Version is the version number of the app -MakeAppx indicates that we want to generate an appx package -Verbose causes full details of the process to be displayed -Sign lets us auto gen the certificates to sign the AppX package -InstallerArguments can be used to specify “/s” is this is required to trigger a silent installation © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/5/2018 12:32 AM Updating the app © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/5/2018 12:32 AM Updating the app The converted app contains as Assets folder, with default images inside We can replace these but as this is inside the PackageFiles folder, we will need to repackage the app like this: Makeappx pack –d “C:\Output\HelloCentennial\PackageFiles” \p “C:\Output\HelloCentennial\HelloCentennial.appx” “pack” specifies that we want to create a package -d is the path of the PackageFiles folder -p is the path of the AppX file we want to create © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/5/2018 12:32 AM Updating the app The converted app contains as Assets folder, with default images inside We can replace these but as this is inside the PackageFiles folder, we will need to repackage the app like this: Makeappx pack –d “C:\Output\HelloCentennial\PackageFiles” /p “C:\Output\HelloCentennial\HelloCentennial.appx” “pack” specifies that we want to create a package -d is the path of the PackageFiles folder -p is the path of the AppX file we want to create Following this, you will have an updated AppX file that can be installed, but first you’ll need to sign it © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Signing the updated app 1/5/2018 12:32 AM Signing the updated app During the original conversion we used the “-Sign” parameter, and the tool did the heavy lifting for us Here, we’ve created the package manually, so we need to sign it manually The Windows 10 SDK provides a tool to do this – signtool.exe We can use the certificates that were generated for us during the conversion Signtool.exe sign /a /v /fd SHA256 /f “C:\Output\HelloCentennial\auto-generated.pfx” /p “123456” “C:\Output\HelloCentennial\HelloCentennial.appx” -f is the path of the pfx file needed to sign the package -p is the password of the .pfx file (when you automatically create the certificate using the –Sign parameter of the Desktop App Converted, the password will have a default value of 123456) The last parameter is the path of the AppX file we generated previously © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Summary Centennial Sample walkthrough Where to next? What, how and why Converting an MSI to an AppX Modifying, repackaging and signing Where to next? Begin modifying your code Typically by using Xaml for the UI The reference blog series is here: https://blogs.msdn.microsoft.com/appconsult/2016/ This will walk you through starting to modify your app to make use of UWP APIs, including how to keep your code compatible with both legacy and Windows 10 © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Continue your Ignite learning path 1/5/2018 12:32 AM Continue your Ignite learning path Visit Channel 9 to access a wide range of Microsoft training and event recordings https://channel9.msdn.com/ Head to the TechNet Eval Centre to download trials of the latest Microsoft products http://Microsoft.com/en-us/evalcenter/ Visit Microsoft Virtual Academy for free online training visit https://www.microsoftvirtualacademy.com © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Thank you Chat with me in the Speaker Lounge Find me @alecdtucker 1/5/2018 12:32 AM Thank you Chat with me in the Speaker Lounge Find me @alecdtucker © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.