Home
%3CLINGO-SUB%20id%3D%22lingo-sub-355389%22%20slang%3D%22en-US%22%3EHandling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-355389%22%20slang%3D%22en-US%22%3E%3CP%3EA%20while%20ago%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FWindows-Dev-AppConsult%2FHandling-auto-updates-for-sideloaded-UWP-and-Desktop-Bridge-apps%2Fba-p%2F317082%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ewe%20have%20explored%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ea%20feature%20added%20in%20Windows%2010%201803%20called%20App%20Installer%2C%20which%20allows%20to%20create%20powerful%20deployment%20experiences%20with%20AppX%20%2F%20MSIX%20packages.%3C%2FP%3E%0A%3CP%3EThanks%20to%20App%20Installer%2C%20you're%20able%20to%20deploy%20a%20package%20(with%20its%20optional%20dependencies)%20on%20a%20web%20site%20or%20an%20Intranet%20share%20and%20let%20your%20users%20to%20download%20from%20it%2C%20instead%20of%20using%20the%20Microsoft%20Store%20or%20a%20similar%20infrastructure.%20You%20have%20also%20the%20opportunity%20to%20enable%20automatic%20updates%2C%20exactly%20like%20the%20Store%20does%3A%20every%20time%20you%20deploy%20an%20updated%20version%20of%20the%20package%20in%20the%20same%20location%2C%20Windows%20will%20take%20care%20of%20automatically%20updating%20the%20application.%3C%2FP%3E%0A%3CP%3EUpdates%20checks%20can%20be%20configured%20in%20two%20ways%3A%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-8%22%3E%0A%3CLI%20id%3D%22pragma-line-8%22%3EEvery%20time%20the%20application%20starts.%20In%20this%20case%2C%20the%20update%20will%20be%20automatically%20downloaded%20and%20installed%20when%20the%20application%20is%20closed.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-9%22%3EAt%20a%20specific%20frequency%20(for%20example%2C%20every%206%20hours).%20In%20this%20case%2C%20the%20update%20will%20be%20automatically%20downloaded%20and%20installed%20if%20the%20application%20is%20not%20running%3B%20otherwise%2C%20it%20will%20be%20installed%20as%20soon%20as%20the%20application%20is%20closed.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EEverything%20is%20controlled%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fapp-installer%2Fapp-installer-file-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eby%20a%20XML%20file%3C%2FA%3E%2C%20with%20.appinstaller%20extension%2C%20which%20is%20deployed%20on%20the%20server%20together%20with%20the%20AppX%20%2F%20MSIX%20package%20you%20want%20to%20distribute.%3C%2FP%3E%0A%3CP%3EThis%20is%20an%20example%20of%20an%20App%20Installer%20file%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-15%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-meta%22%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EAppInstaller%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EUri%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22https%3A%2F%2Fmsix-appinstaller.azurewebsites.net%2FMyEmployees.Package.appinstaller%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EVersion%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%221.0.0.0%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Exmlns%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%22%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EMainBundle%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EName%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%2297437f1b-36c5-47b0-9f3d-9f5aaa5c5aab%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EVersion%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%221.0.0.0%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EPublisher%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22CN%3Dmpagani%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EUri%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22https%3A%2F%2Fmsix-appinstaller.azurewebsites.net%2FMyEmployees.Package_1.0.0.0_Test%2FMyEmployees.Package_1.0.0.0_x86_x64.msixbundle%22%3C%2FSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EOnLaunch%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EHoursBetweenUpdateChecks%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%220%22%3C%2FSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%0A%3CSPAN%20class%3D%22hljs-tag%22%3EAppInstaller%3C%2FSPAN%3E%26gt%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThe%20two%20relevant%20nodes%20are%3A%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-27%22%3E%0A%3CLI%20id%3D%22pragma-line-27%22%3E%3CSTRONG%3EMainBundle%3C%2FSTRONG%3E%2C%20which%20specifies%20the%20Uri%20and%20the%20info%20about%20the%20MSIX%20package%20to%20deploy.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-28%22%3E%3CSTRONG%3EUpdateSettings%3C%2FSTRONG%3E%2C%20which%20configures%20the%20auto%20update%20feature.%20The%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EHoursBetweenUpdateChecks%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eattribute%20can%20be%20set%20to%200%2C%20in%20case%20you%20want%20to%20check%20for%20updates%20every%20time%20the%20app%20is%20launched%2C%20or%20to%20a%20fixed%20value%2C%20in%20case%20you%20want%20to%20enable%20periodic%20checks.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20App%20Installer%20file%20is%20simply%20a%20XML%20file%2C%20so%20it%20can%20be%20manually%20created%20with%20any%20text%20editor.%20However%2C%20the%20simplest%20way%20to%20generate%20it%20is%20through%20Visual%20Studio.%20When%20you%20trigger%20the%20process%20to%20create%20a%20MSIX%20%2F%20AppX%20package%20(right%20click%20on%20the%20UWP%20%2F%20Windows%20Application%20Packaging%20Project%20and%20choose%20Store%20-%26gt%3B%20Create%20App%20Packages)%2C%20you%20can%20opt-in%20to%20enable%20automatic%20updates.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20572px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84076iA428DCED73AAEED2%2Fimage-dimensions%2F572x490%3Fv%3D1.0%22%20width%3D%22572%22%20height%3D%22490%22%20alt%3D%22automaticupdates.png%22%20title%3D%22automaticupdates.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fautomaticupdates.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EIn%20this%20case%20Visual%20Studio%20will%20generate%2C%20other%20than%20the%20AppX%20%2F%20MSIX%20package%2C%20also%20the%20relevant%20App%20Installer%20file%2C%20ready%20to%20be%20deployed%20on%20your%20web%20server%20or%20local%20share.%20The%20output%20will%20include%20also%20a%20HTML%20page%2C%20which%20enables%20your%20users%20to%20start%20the%20installation%20process%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20609px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84077iA1B5461110726AE2%2Fimage-dimensions%2F609x476%3Fv%3D1.0%22%20width%3D%22609%22%20height%3D%22476%22%20alt%3D%22webpage.png%22%20title%3D%22webpage.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fwebpage.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EGet%20the%20app%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebutton%20simply%20includes%20a%20link%20to%20the%20.appinstaller%20file%20using%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eappinstaller%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eprotocol%2C%20which%20is%20natively%20supported%20by%20Windows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-40%22%20class%3D%22language-txt%20hljs%20text%22%3Ems-appinstaller%3A%3Fsource%3Dhttps%3A%2F%2Fmsix-appinstaller.azurewebsites.net%2FMyEmployees.Package.appinstaller%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThanks%20to%20this%20protocol%20the%20user%20won't%20have%20to%20download%20any%20files%2C%20but%20the%20installation%20experience%20will%20be%20automatically%20triggered%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20650px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84078i2D3DA9E2B3A438C3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22installapp.png%22%20title%3D%22installapp.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Finstallapp.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EIn%20this%20post%20we're%20going%20to%20see%204%20new%20App%20Installer%20features%20that%20were%20highly%20requested%20and%20that%20have%20been%20implemented%20in%201809%20and%20the%20upcoming%2019H1%20update%3A%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-50%22%3E%0A%3CLI%20id%3D%22pragma-line-50%22%3EAutomatically%20notify%20the%20presence%20of%20an%20update%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-51%22%3ESupport%20critical%20updates%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-52%22%3ESupport%20downgrades%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-53%22%3EProgrammatically%20check%20for%20updates%20using%20a%20dedicated%20API%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20first%203%20ones%20can%20be%20implemented%20without%20any%20code%20change%2C%20while%20the%204th%20one%20is%20dedicated%20to%20developers.%20Let's%20start%20to%20see%20them%20in%20more%20details!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22moving-to-the-new-app-installer-version%22%20id%3D%22toc-hId-1481466496%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%20id%3D%22toc-hId-1509231458%22%3EMoving%20to%20the%20new%20App%20Installer%20version%3C%2FH3%3E%0A%3CP%3EIn%20order%20to%20leverage%20the%20new%20features%20described%20in%20this%20post%2C%20you%20will%20need%20to%20use%20the%20new%20App%20Installer%20definition.%20The%20versioning%20is%20defined%20through%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Exmlns%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eattribute%20of%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAppInstaller%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eelement.%20The%20current%20version%20looks%20like%20this%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-61%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EAppInstaller%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EUri%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22https%3A%2F%2Fmsix-appinstaller.azurewebsites.net%2FMyEmployees.Package.appinstaller%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EVersion%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%221.0.0.0%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Exmlns%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%22%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThis%20is%2C%20instead%2C%20the%20definition%20of%20the%20new%20version%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-67%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EAppInstaller%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EUri%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22https%3A%2F%2Fmsix-appinstaller.azurewebsites.net%2FMyEmployees.Package.appinstaller%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EVersion%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%221.0.0.0%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3Exmlns%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%22%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EAs%20you%20can%20see%2C%20the%20suffix%20of%20the%20schema%20is%20changed%20from%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E2017%2F2%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E2018%3C%2FSTRONG%3E.%20The%20other%20requirement%2C%20as%20per%20the%20title%20of%20this%20post%2C%20is%20to%20use%20Windows%2010%2019H1.%20The%20next%20version%20of%20Windows%2010%20is%20still%20in%20development%20and%2C%20as%20such%2C%20you%20can%20get%20it%20for%20the%20moment%20through%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Finsider.windows.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Insider%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eprogram.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22new-update-experience%22%20id%3D%22toc-hId--1070690465%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%20id%3D%22toc-hId--1042925503%22%3ENew%20update%20experience%3C%2FH3%3E%0A%3CP%3EThe%20current%20implementation%20of%20automatic%20updates%20has%20a%20limitation.%20If%20you%20deploy%20an%20update%20on%20the%20server%20and%20the%20user%20opens%20the%20application%2C%20he%20won't%20know%20that%20there's%20a%20new%20version%20until%20he%20restarts%20it.%20In%20some%20cases%20(think%2C%20for%20example%2C%20to%20a%20critical%20business%20app%20which%20is%20always%20kept%20open%20and%20rarely%20restarted)%2C%20it%20may%20take%20a%20while%20before%20the%20conditions%20for%20the%20update%20to%20be%20applied%20are%20satisfied.%3C%2FP%3E%0A%3CP%3EWindows%2010%2019H1%20has%20introduced%20support%20for%20an%20update%20prompt.%20When%20the%20user%20starts%20the%20app%20and%20there's%20a%20new%20update%20available%2C%20he%20will%20see%20a%20prompt%20with%20a%20notification.%20The%20user%20will%20have%20the%20option%20to%20apply%20the%20update%20immediately%20or%20to%20continue%20opening%20the%20app%20and%20apply%20it%20once%20it's%20closed.%3C%2FP%3E%0A%3CP%3EThis%20is%20the%20user%20experience%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20515px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84079iB26351F721012854%2Fimage-dimensions%2F515x554%3Fv%3D1.0%22%20width%3D%22515%22%20height%3D%22554%22%20alt%3D%22checkupdates.png%22%20title%3D%22checkupdates.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fcheckupdates.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20enable%20this%20behavior%2C%20it's%20enough%20to%20add%20a%20new%20attribute%20in%20the%20App%20Installer%20file%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EShowPrompt%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20set%20it%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etrue%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-85%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EOnLaunch%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EHoursBetweenUpdateChecks%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%220%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EShowPrompt%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22true%22%3C%2FSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-tag%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CH3%20id%3D%22toc-hId-672119870%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%20id%3D%22toc-hId-699884832%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22critical-updates%22%20id%3D%22toc-hId--1880037091%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%20id%3D%22toc-hId--1852272129%22%3ECritical%20updates%3C%2FH3%3E%0A%3CP%3EWith%20the%20previous%20feature%2C%20you%20can%20show%20a%20prompt%20to%20notify%20the%20user%20that%20an%20update%20is%20pending.%20However%2C%20he's%20still%20able%20to%20open%20the%20app%20and%20postpone%20the%20update%20at%20a%20later%20time.%20What%20if%20the%20update%20contains%20a%20fix%20for%20a%20critical%20bug%20and%20users%20shouldn't%20be%20allowed%20to%20launch%20an%20outdated%20version%20of%20the%20app%3F%20Thanks%20to%20a%20new%20attribute%2C%20now%20you%20can%20also%20mark%20an%20update%20as%20critical%20and%20force%20the%20user%20to%20install%20it%20before%20opening%20the%20app.%3C%2FP%3E%0A%3CP%3EThis%20is%20the%20user%20experience%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20502px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84080i86998FA5C7359E48%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22criticalupdate.png%22%20title%3D%22criticalupdate.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fcriticalupdate.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EAs%20you%20can%20see%20from%20the%20message%2C%20the%20user%20doesn't%20have%20the%20option%20to%20launch%20the%20app%20anymore.%20The%20update%20will%20be%20applied%20anyway%2C%20regardless%20of%20his%20choice.%20The%20only%20difference%20is%20that%2C%20if%20he%20presses%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebutton%2C%20the%20app%20will%20be%20started%20immediately%20after%20the%20update%20has%20been%20installed.%20If%20he%20presses%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECancel%3C%2FSTRONG%3E%2C%20instead%2C%20the%20update%20will%20be%20applied%20but%20the%20app%20won't%20be%20launched.%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20enable%20this%20behavior%2C%20you%20just%20have%20to%20add%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUpdateBlocksActivation%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eattribute%20and%20set%20it%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etrue%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-102%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EOnLaunch%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EHoursBetweenUpdateChecks%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%220%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EShowPrompt%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22true%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EUpdateBlocksActivation%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%22true%22%3C%2FSPAN%3E%20%2F%26gt%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-tag%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIn%20order%20to%20make%20it%20working%2C%20also%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EShowPrompt%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eattribute%20must%20be%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etrue%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--137226756%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%20id%3D%22toc-hId--109461794%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22supporting-downgrades%22%20id%3D%22toc-hId-1605583579%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%20id%3D%22toc-hId-1633348541%22%3ESupporting%20downgrades%3C%2FH3%3E%0A%3CP%3EIn%20some%20scenarios%2C%20you%20may%20need%20to%20ask%20to%20your%20users%20to%20downgrade%20their%20application%20to%20a%20previous%20version.%20For%20example%2C%20you%20may%20have%20discovered%20a%20critical%20bug%20in%20the%20new%20version%20which%20will%20require%20some%20time%20to%20be%20fixed%20but%2C%20at%20the%20same%20time%2C%20you%20can't%20block%20your%20users%20for%20a%20long%20time.%20Thanks%20to%20a%20new%20App%20Installer%20feature%2C%20you%20can%20enable%20applications%20to%20be%20downgraded%20while%2C%20normally%2C%20you%20would%20be%20able%20to%20install%20a%20package%20only%20if%20it%20has%20a%20higher%20version%20number%20than%20the%20one%20already%20installed%20on%20the%20machine.%20However%2C%20unlike%20for%20the%20previous%20features%2C%20downgrades%20can't%20be%20automatically%20delivered%2C%20but%20they%20must%20be%20manually%20installed.%20When%20the%20downgrade%20feature%20is%20enabled%20and%20the%20user%20presses%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EGet%20the%20app%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebutton%20from%20the%20web%20page%2C%20this%20is%20the%20experience%20he%20will%20see%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20652px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84081iEC60717E497EAA79%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22downgrade.png%22%20title%3D%22downgrade.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fdowngrade.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3CP%3EThe%20user%20has%20the%20ability%20to%20press%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebutton%2C%20but%20he's%20warned%20that%20the%20current%20version%20on%20his%20machine%20is%20newer.%3C%2FP%3E%0A%3CP%3ETo%20enable%20this%20feature%20you%20need%20to%20add%20a%20new%20element%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUpdateSettings%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Enode%20of%20the%20App%20Installer%20file%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-121%22%20class%3D%22language-xml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EUpdateSettings%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EOnLaunch%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-attr%22%3EHoursBetweenUpdateChecks%3C%2FSPAN%3E%3D%3CSPAN%20class%3D%22hljs-string%22%3E%220%22%3C%2FSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22hljs-tag%22%3E%26lt%3B%3CSPAN%20class%3D%22hljs-name%22%3EForceUpdateFromAnyVersion%3C%2FSPAN%3E%26gt%3B%3C%2FSPAN%3Etrue%3CSPAN%20class%3D%22hljs-tag%22%3EForceUpdateFromAnyVersion%3C%2FSPAN%3E%26gt%3B%0A%3CSPAN%20class%3D%22hljs-tag%22%3EUpdateSettings%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThe%20element%20is%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EForceUpdateFromAnyVersion%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20must%20be%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etrue%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eif%20you%20want%20to%20enable%20this%20feature.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22check-for-updates-within-the-app%22%20id%3D%22toc-hId--946573382%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%20id%3D%22toc-hId--918808420%22%3ECheck%20for%20updates%20within%20the%20app%3C%2FH3%3E%0A%3CP%3EIn%20some%20scenarios%20you%20may%20want%20more%20flexibility%20in%20handling%20the%20update%20story.%20For%20example%2C%20you%20could%20offer%20an%20option%20within%20the%20app%20to%20check%20for%20updates%3B%20or%20you%20can%20implement%2C%20within%20the%20app%2C%20a%20periodic%20check%2C%20so%20that%20you%20can%20immediately%20warn%20the%20user%20that%20there's%20a%20new%20version%20available%2C%20without%20waiting%20for%20him%20to%20close%20and%20restart%20the%20application.%20Before%20Windows%2010%201809%2C%20the%20Universal%20Windows%20Platform%20included%20some%20APIs%20to%20check%20the%20availability%20of%20updates%2C%20but%20they%20were%20reserved%20only%20to%20applications%20published%20on%20the%20Microsoft%20Store.%20Now%2C%20instead%2C%20you%20can%20check%20for%20available%20updates%20also%20when%20the%20application%20is%20manually%20distributed%20using%20an%20App%20Installer%20file.%3C%2FP%3E%0A%3CP%3EIf%20your%20application%20is%20built%20on%20top%20of%20the%20Universal%20Windows%20Platform%2C%20you're%20good%20to%20go.%20Otherwise%2C%20if%20it's%20a%20Win32%20application%2C%20you%20will%20have%20to%20integrate%20the%20UWP%20ecosystem%20in%20your%20project.%20You%20will%20need%20to%20add%20a%20reference%20to%20two%20files%3A%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-136%22%3E%0A%3CLI%20id%3D%22pragma-line-136%22%3E%3CSTRONG%3EWindows.md%3C%2FSTRONG%3E%2C%20which%20contains%20the%20metadata%20that%20describes%20all%20the%20APIs%20of%20the%20Universal%20Windows%20Platform.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-137%22%3E%3CSTRONG%3ESystem.Runtime.WindowsRuntime%3C%2FSTRONG%3E%2C%20which%20is%20a%20library%20that%20contains%20the%20infrastructure%20required%20to%20properly%20support%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EIAsyncOperation%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etype%2C%20which%20is%20used%20by%20the%20Universal%20Windows%20Platform%20to%20handle%20asynchronous%20operation%20with%20the%20well%20known%20async%20%2F%20await%20pattern.%20Without%20this%20library%20your%20options%20to%20interact%20with%20the%20Universal%20Windows%20Platform%20would%20be%20very%20limited%2C%20since%20all%20the%20APIs%20which%20take%20more%20than%2050%20ms%20to%20return%20a%20result%20are%20implemented%20with%20this%20pattern.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ELet's%20see%20the%20required%20steps%20for%20a%20WPF%20or%20Windows%20Forms%20application%3A%3C%2FP%3E%0A%3COL%20id%3D%22pragma-line-141%22%3E%0A%3CLI%20id%3D%22pragma-line-141%22%3E%0A%3CP%3EOpen%20your%20project%20in%20Visual%20Studio%2C%20right%20click%20on%20it%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%20reference%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-142%22%3E%0A%3CP%3ELook%20for%20the%20following%20folder%20on%20the%20system%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%3A%5CProgram%20Files%20(x86)%5CWindows%20Kits%5C10%5CUnionMetadata%5C10.0.17763.0%3C%2FSTRONG%3E.%20If%20you%20don't%20have%20it%2C%20you%20must%20install%20first%20the%20Windows%2010%20SDK%20which%20ships%20with%20Visual%20Studio.%20Alternatively%2C%20you%20can%20download%20the%20specific%20installer%20from%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Fwindows%2Fdownloads%2Fwindows-10-sdk%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethe%20official%20website%3C%2FA%3E.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-143%22%3E%0A%3CP%3EChange%20the%20dropdown%20to%20filter%20the%20file%20types%20from%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EComponent%20files%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAll%20files%3C%2FSTRONG%3E.%20This%20way%2C%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EWindows.md%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efile%20will%20become%20visible.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20832px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84082i8C6781C5FF48C0BF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22addwindowsmd.png%22%20title%3D%22addwindowsmd.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Faddwindowsmd.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-147%22%3E%0A%3CP%3EClick%20on%20it%20and%20press%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-148%22%3E%0A%3CP%3ENow%20press%20again%20the%20Browse%20button.%20This%20time%20look%20for%20the%20following%20folder%20on%20the%20system%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EC%3A%5CWindows%5CMicrosoft.NET%5CFramework%5Cv4.0.30319%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-149%22%3E%0A%3CP%3ELook%20for%20a%20file%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESystem.Runtime.WindowsRuntime.dll%3C%2FSTRONG%3E%2C%20select%20it%20and%20press%20Ok.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-150%22%3E%0A%3CP%3EAs%20last%20step%2C%20expand%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EReferences%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20of%20your%20project%20in%20Solution%20Explorer%20and%20look%20for%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EWindows%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ereference.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20343px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84083iEFC18F6B6E28FF2F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22WindowsReference.png%22%20title%3D%22WindowsReference.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2FWindowsReference.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-154%22%3E%0A%3CP%3ERight%20click%20on%20it%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProperties%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-155%22%3E%0A%3CP%3EChange%20the%20value%20of%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECopy%20Local%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eproperty%20from%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ETrue%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EFalse%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EThat's%20it.%20Now%20you%20can%20leverage%20APIs%20from%20the%20Universal%20Windows%20Platform%20in%20your%20Win32%20application.%20The%20one%20we're%20looking%20for%20to%20check%20for%20updates%20is%20part%20of%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EWindows.ApplicationModel.Package%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eclass.%20Here%20is%20a%20sample%20usage%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-159%22%20class%3D%22language-csharp%20hljs%22%3E%3CSPAN%20class%3D%22hljs-function%22%3E%3CSPAN%20class%3D%22hljs-keyword%22%3Eprivate%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-keyword%22%3Easync%3C%2FSPAN%3E%20Task%20%3CSPAN%20class%3D%22hljs-title%22%3ECheckForUpdates%3C%2FSPAN%3E()%0A%3C%2FSPAN%3E%7B%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-keyword%22%3Evar%3C%2FSPAN%3E%20result%20%3D%20%3CSPAN%20class%3D%22hljs-keyword%22%3Eawait%3C%2FSPAN%3E%20Package.Current.CheckUpdateAvailabilityAsync()%3B%0A%20%20%20%20%3CSPAN%20class%3D%22hljs-keyword%22%3Eif%3C%2FSPAN%3E%20(result.Availability%20%3D%3D%20PackageUpdateAvailability.Available)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20MessageBox.Show(%3CSPAN%20class%3D%22hljs-string%22%3E%22There's%20a%20new%20update!%20Restart%20your%20app%20to%20install%20it%22%3C%2FSPAN%3E)%3B%0A%20%20%20%20%7D%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EAs%20you%20can%20see%2C%20the%20API%20is%20pretty%20simple%20to%20use.%20You%20just%20call%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECheckUpdateAvailabilityAsync()%3C%2FSTRONG%3E%2C%20which%20will%20return%20an%20enumerator%20of%20type%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EPackageUpdateAvailability%3C%2FSTRONG%3E.%20The%20result%20can%20assume%20different%20values%2C%20based%20on%20the%20update%20status.%20In%20the%20sample%2C%20we%20just%20use%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAvailable%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Evalue%20to%20determine%20if%20there's%20indeed%20an%20update%20so%20that%20we%20can%20inform%20the%20user%20with%20a%20message.%20You%20could%20also%20check%20for%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ERequired%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Evalue%2C%20in%20case%20you%20want%20to%20apply%20a%20different%20logic%20if%20there's%20a%20critical%20update.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-796236953%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%20id%3D%22toc-hId-824001915%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22wrapping-up%22%20id%3D%22toc-hId--1755920008%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%20id%3D%22toc-hId--1728155046%22%3EWrapping%20up%3C%2FH3%3E%0A%3CP%3EIn%20this%20short%20post%20we%20have%20seen%20some%20new%20features%20that%20have%20been%20added%20to%20App%20Installer%20in%20Windows%2010%2019H1%2C%20which%20addresses%20many%20feedbacks%20received%20from%20developers%20and%20IT%20Pros.%20Now%2C%20other%20than%20just%20enabling%20auto-updating%2C%20we%20can%20also%20notify%20the%20user%20that%20an%20update%20is%20pending%3B%20we%20can%20handle%20critical%20updates%3B%20we%20can%20support%20downgrade%3B%20we%20can%20provide%20a%20customized%20user%20experience.%20Thanks%20to%20these%20improvements%2C%20MSIX%20and%20App%20Installer%20are%20becoming%20more%20and%20more%20a%20great%20choice%20when%20it%20comes%20to%20distribute%20applications%20interanlly%20in%20your%20enterprise%20or%20to%20your%20customers!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-401236%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-401236%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20not%20automatically.%20You%20would%20need%20to%20publish%20different%20versions%20of%20the%20application%20with%20a%20different%20identity%20on%20different%20websites%2C%20otherwise%2C%20if%20you%20keep%20the%20same%20name%20and%20publisher%2C%20the%20apps%20will%20%22overlap%22%20each%20other.%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20this%20requirement%20your%20best%20chance%20is%20to%20use%20the%20Microsoft%20Store%2C%20since%20it%20supports%20the%20flighting%20concept.%20You%20can%20define%20multiple%20%22rings%22%2C%20each%20of%20them%20with%20a%20set%20of%20specific%20users.%20When%20you%20publish%20an%20update%20on%20a%20specific%20ring%2C%20only%20the%20users%20included%20in%20that%20ring%20will%20get%20it.%20All%20the%20other%20will%20continue%20to%20get%20the%20standard%20%22stable%22%20version%20from%20the%20main%20channel.%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20more%20details%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fpublish%2Fpackage-flights%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fpublish%2Fpackage-flights%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-401235%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-401235%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20it%20possible%20to%20create%20different%20update%20channels%20(using%20this%20method)%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-734619%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-734619%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20the%20article%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44595%22%20target%3D%22_blank%22%3E%40Matteo%20Pagani%3C%2FA%3E.%20I%20searched%20far%20and%20wide%20for%20this%20information.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-799655%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799655%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20the%20app%20installer%20supported%20in%20Windows%2010%20IoT%20Core%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-799660%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799660%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20question%20%3A)I%20don't%20know%20the%20answer%20out%20of%20the%20box%2C%20let%20me%20do%20some%20digging.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804608%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804608%22%20slang%3D%22en-US%22%3EHow%20can%20you%20have%20one%20appinstaller%20file%20being%20used%20by%20devices%20with%20different%20Windows%20versions.%3F%20want%20to%20have%20one%20file%20that%20Windows%2010%201803%2C%201809%20and%201903%20use%20to%20update%20using%20the%20OnLaunch%20element.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804669%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804669%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20if%20you%20use%20an%20.appinstaller%20file%20which%20contains%20some%20features%20which%20are%20supported%20only%20on%20newer%20versions%20of%20Windows%2010%2C%20they%20will%20simply%20be%20ignored%20by%20earlier%20versions.%20For%20example%2C%20if%20you%20specify%20the%20ShowPrompt%20attribute%2C%20it%20won't%20cause%20any%20effect%20if%20the%20user%20is%20running%20Windows%2010%201809.%20The%20application%20will%20continue%20to%20be%20silently%20updated.%20If%20the%20user%20is%20on%20Windows%2010%201903%2C%20instead%2C%20he%20will%20see%20the%20prompt%20once%20there's%20an%20update%20available.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804879%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804879%22%20slang%3D%22en-US%22%3EI'm%20not%20sure%20about%20that.%20I%20tried%20with%20an%20.appinstaller%20with%20schema%20%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%3C%2FA%3Ethat%20had%20showprompt%3D%22%22%20is%3D%22%22%20defined%3D%22%22%20in%3D%22%22%20the%3D%22%22%20%3D%22%22%26gt%3B%20App%20installation%20failed%20with%20error%20message%3A%20error%200xC00CE015%3A%20App%20manifest%20validation%20error%3A%20The%20app%20manifest%20must%20be%20valid%20as%20per%20schema%3A%20Line%2012%2C%20Column%2041%2C%20Reason%3A%20The%20attribute%20'ShowPrompt'%20on%20the%20element%20'%7B%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%7DOnLaunch%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%7DOnLaunch%3C%2FA%3E'%20is%20not%20defined%20in%20the%20DTD%2FSchema.%20(0xc00ce015)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804890%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804890%22%20slang%3D%22en-US%22%3EI'm%20not%20sure%20about%20that.%20I%20tried%20with%20an%20.appinstaller%20with%20schema%20%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%3C%2FA%3E%20that%20had%20ShowPrompt%3D%22true%22.%20ShowPrompt%20is%20defined%20in%20the%20%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%3C%2FA%3E%20schema.%20The%20App%20Installer%20UI%20showed%20the%20following%20message%20on%20a%20Windows%2010%201903%20device%3A%20App%20installation%20failed%20with%20error%20message%3A%20error%200xC00CE015%3A%20App%20manifest%20validation%20error%3A%20The%20app%20manifest%20must%20be%20valid%20as%20per%20schema%3A%20Line%2012%2C%20Column%2041%2C%20Reason%3A%20The%20attribute%20'ShowPrompt'%20on%20the%20element%20'%7B%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%7DOnLaunch%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2017%2F2%7DOnLaunch%3C%2FA%3E'%20is%20not%20defined%20in%20the%20DTD%2FSchema.%20(0xc00ce015)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804891%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804891%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20right%20schema%20URL%20to%20support%20ShowPrompt%20is%20%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%3C%2FA%3E.%20Using%20this%20schema%20shouldn't%20block%20you%20to%20use%20this%20AppInstaller%20file%20on%20Windows%2010%20versions%20earlier%20than%201903.%20Did%20you%20give%20it%20a%20try%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-804910%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-804910%22%20slang%3D%22en-US%22%3EYes%2C%20if%20I%20increase%20the%20schema%20I%20can%20use%20the%20.appinstaller%20file%20on%201903%20and%201809%2C%20but%20not%20on%201803.%20I%20would%20like%20to%20not%20increase%20the%20schema%20because%20Windows%2010%201803%20devices%20will%20not%20be%20able%20to%20use%20the%20.appinstaller%2C%20which%20is%20something%20that%20I%20absolutely%20need%20(not%20all%20devices%20that%20run%20our%20app%20are%20on%20the%20latest%20Windows%20version).%20If%20there%20was%20a%20way%20to%20have%20schemas%20not%20depend%20on%20Windows%20version%2C%20many%20problems%20would%20disappear.%20Let's%20say%20if%20I%20add%20ShowPrompt%20to%20an%20.appinstaller%20with%202017%2F2%20schema%2C%20ignore%20it%20when%20an%201803%20device%20uses%20the%20.appinstaller%2C%20but%20if%20a%201809%20or%201903%20device%20uses%20the%20file%2C%20consider%20ShowPrompt.%20What%20do%20you%20think%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-862577%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-862577%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20very%20strange%20problem%20attempting%20to%20update%20using%20app%20installer%20and%20I%20have%20no%20idea%20where%20to%20ask%20about%20it%2C%20or%20to%20report%20it%20as%20a%20bug%20except%20maybe%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20application%20installs%20fine.%26nbsp%3B%20On%20updating%20it%20and%20launching%20it%2C%20the%20update%20is%20detected%20fine.%26nbsp%3B%20On%20clicking%20the%20button%20to%20install%20the%20update%20it%20fails%20with%20the%20following%20lines%20being%20written%20to%20AILog.txt%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EERROR%3A%20StartInstallOperation%20-%26gt%3B%20Install%20Operation%20Failed%3A%200x80070057%3C%2FP%3E%3CP%3EGetErrorMessageFromHResult%20-%26gt%3B%20Message%3A%20%5BThe%20parameter%20is%20incorrect.%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWatching%20the%20update%20process%20in%20Fiddler%2C%20I%20can%20see%20that%20the%20appinstaller%20file%20is%20read%20in%20its%20entirety%20numerous%20times%20and%20then%20two%20overlapping%20range%20requests%20are%20issued%20for%20a%20very%20small%20part%20of%20the%20msix%20package.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20cannot%20understand%20what%20%22parameter%22%20can%20be%20incorrect%20since%20the%20application%20installs%20fine%20and%20the%20msix%20can%20be%20updated%20directly%20from%20powershell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERather%20I%20wonder%20if%20it%20is%20this%20strange%20range%20request%20processing%20that%20is%20buggy%20and%20the%20failure%20is%20in%20fact%20an%20internal%20one%20when%20it%20calculates%20its%20next%20wacky%20range.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20anything%20I%20can%20do%20to%20troubleshoot%20this%20further%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-863808%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20application%20updates%20with%20App%20Installer%20and%20MSIX%20in%20Windows%2010%2019H1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-863808%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Glen%2C%3C%2FP%3E%0A%3CP%3Ewould%20you%20have%20the%20chance%20to%20share%20the%20MSIX%20package%20and%20the%20AppInstaller%20file%3F%20I%20will%20be%20happy%20to%20help%20troubleshooting%20this%20and%20reach%20the%20PG%20for%20investigations.%3C%2FP%3E%0A%3CP%3EIf%20yes%2C%20just%20send%20me%20a%20mail%20at%20name.surname%40microsoft.com%20with%20all%20the%20details.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

A while ago we have explored a feature added in Windows 10 1803 called App Installer, which allows to create powerful deployment experiences with AppX / MSIX packages.

Thanks to App Installer, you're able to deploy a package (with its optional dependencies) on a web site or an Intranet share and let your users to download from it, instead of using the Microsoft Store or a similar infrastructure. You have also the opportunity to enable automatic updates, exactly like the Store does: every time you deploy an updated version of the package in the same location, Windows will take care of automatically updating the application.

Updates checks can be configured in two ways:

  • Every time the application starts. In this case, the update will be automatically downloaded and installed when the application is closed.
  • At a specific frequency (for example, every 6 hours). In this case, the update will be automatically downloaded and installed if the application is not running; otherwise, it will be installed as soon as the application is closed.

Everything is controlled by a XML file, with .appinstaller extension, which is deployed on the server together with the AppX / MSIX package you want to distribute.

This is an example of an App Installer file:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller Uri="https://msix-appinstaller.azurewebsites.net/MyEmployees.Package.appinstaller" Version="1.0.0.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
  <MainBundle Name="97437f1b-36c5-47b0-9f3d-9f5aaa5c5aab" Version="1.0.0.0" Publisher="CN=mpagani" Uri="https://msix-appinstaller.azurewebsites.net/MyEmployees.Package_1.0.0.0_Test/MyEmployees.Package_1.0.0.0_x86_x64.msixbundle" />
  <UpdateSettings>
    <OnLaunch HoursBetweenUpdateChecks="0" />
  </UpdateSettings>
</AppInstaller>

The two relevant nodes are:

  • MainBundle, which specifies the Uri and the info about the MSIX package to deploy.
  • UpdateSettings, which configures the auto update feature. The HoursBetweenUpdateChecks attribute can be set to 0, in case you want to check for updates every time the app is launched, or to a fixed value, in case you want to enable periodic checks.

The App Installer file is simply a XML file, so it can be manually created with any text editor. However, the simplest way to generate it is through Visual Studio. When you trigger the process to create a MSIX / AppX package (right click on the UWP / Windows Application Packaging Project and choose Store -> Create App Packages), you can opt-in to enable automatic updates.

automaticupdates.png

 

In this case Visual Studio will generate, other than the AppX / MSIX package, also the relevant App Installer file, ready to be deployed on your web server or local share. The output will include also a HTML page, which enables your users to start the installation process:

 

webpage.png

 

The Get the app button simply includes a link to the .appinstaller file using the appinstaller protocol, which is natively supported by Windows:

 

ms-appinstaller:?source=https://msix-appinstaller.azurewebsites.net/MyEmployees.Package.appinstaller

Thanks to this protocol the user won't have to download any files, but the installation experience will be automatically triggered:

 

installapp.png

 

In this post we're going to see 4 new App Installer features that were highly requested and that have been implemented in 1809 and the upcoming 19H1 update:

  • Automatically notify the presence of an update
  • Support critical updates
  • Support downgrades
  • Programmatically check for updates using a dedicated API

The first 3 ones can be implemented without any code change, while the 4th one is dedicated to developers. Let's start to see them in more details!

 

Moving to the new App Installer version

In order to leverage the new features described in this post, you will need to use the new App Installer definition. The versioning is defined through the xmlns attribute of the AppInstaller element. The current version looks like this:

<AppInstaller Uri="https://msix-appinstaller.azurewebsites.net/MyEmployees.Package.appinstaller" Version="1.0.0.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">

This is, instead, the definition of the new version:

<AppInstaller Uri="https://msix-appinstaller.azurewebsites.net/MyEmployees.Package.appinstaller" Version="1.0.0.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2018">

As you can see, the suffix of the schema is changed from 2017/2 to 2018. The other requirement, as per the title of this post, is to use Windows 10 19H1. The next version of Windows 10 is still in development and, as such, you can get it for the moment through the Windows Insider program.

 

New update experience

The current implementation of automatic updates has a limitation. If you deploy an update on the server and the user opens the application, he won't know that there's a new version until he restarts it. In some cases (think, for example, to a critical business app which is always kept open and rarely restarted), it may take a while before the conditions for the update to be applied are satisfied.

Windows 10 19H1 has introduced support for an update prompt. When the user starts the app and there's a new update available, he will see a prompt with a notification. The user will have the option to apply the update immediately or to continue opening the app and apply it once it's closed.

This is the user experience:

 

checkupdates.png

 

In order to enable this behavior, it's enough to add a new attribute in the App Installer file called ShowPrompt and set it to true:

<UpdateSettings>
  <OnLaunch HoursBetweenUpdateChecks="0" ShowPrompt="true" />
</UpdateSettings>

 

Critical updates

With the previous feature, you can show a prompt to notify the user that an update is pending. However, he's still able to open the app and postpone the update at a later time. What if the update contains a fix for a critical bug and users shouldn't be allowed to launch an outdated version of the app? Thanks to a new attribute, now you can also mark an update as critical and force the user to install it before opening the app.

This is the user experience:

 

criticalupdate.png

 

As you can see from the message, the user doesn't have the option to launch the app anymore. The update will be applied anyway, regardless of his choice. The only difference is that, if he presses the Update button, the app will be started immediately after the update has been installed. If he presses Cancel, instead, the update will be applied but the app won't be launched.

In order to enable this behavior, you just have to add the UpdateBlocksActivation attribute and set it to true:

<UpdateSettings>
    <OnLaunch HoursBetweenUpdateChecks="0" ShowPrompt="true" UpdateBlocksActivation="true" />
</UpdateSettings>

In order to make it working, also the ShowPrompt attribute must be set to true.

 

Supporting downgrades

In some scenarios, you may need to ask to your users to downgrade their application to a previous version. For example, you may have discovered a critical bug in the new version which will require some time to be fixed but, at the same time, you can't block your users for a long time. Thanks to a new App Installer feature, you can enable applications to be downgraded while, normally, you would be able to install a package only if it has a higher version number than the one already installed on the machine. However, unlike for the previous features, downgrades can't be automatically delivered, but they must be manually installed. When the downgrade feature is enabled and the user presses the Get the app button from the web page, this is the experience he will see:

 

downgrade.png

 

The user has the ability to press the Update button, but he's warned that the current version on his machine is newer.

To enable this feature you need to add a new element to the UpdateSettings node of the App Installer file:

<UpdateSettings>
  <OnLaunch HoursBetweenUpdateChecks="0"/>
  <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings

The element is called ForceUpdateFromAnyVersion and must be set to true if you want to enable this feature.

 

Check for updates within the app

In some scenarios you may want more flexibility in handling the update story. For example, you could offer an option within the app to check for updates; or you can implement, within the app, a periodic check, so that you can immediately warn the user that there's a new version available, without waiting for him to close and restart the application. Before Windows 10 1809, the Universal Windows Platform included some APIs to check the availability of updates, but they were reserved only to applications published on the Microsoft Store. Now, instead, you can check for available updates also when the application is manually distributed using an App Installer file.

If your application is built on top of the Universal Windows Platform, you're good to go. Otherwise, if it's a Win32 application, you will have to integrate the UWP ecosystem in your project. You will need to add a reference to two files:

  • Windows.md, which contains the metadata that describes all the APIs of the Universal Windows Platform.
  • System.Runtime.WindowsRuntime, which is a library that contains the infrastructure required to properly support the IAsyncOperation type, which is used by the Universal Windows Platform to handle asynchronous operation with the well known async / await pattern. Without this library your options to interact with the Universal Windows Platform would be very limited, since all the APIs which take more than 50 ms to return a result are implemented with this pattern.

Let's see the required steps for a WPF or Windows Forms application:

  1. Open your project in Visual Studio, right click on it and choose Add reference.

  2. Look for the following folder on the system: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0. If you don't have it, you must install first the Windows 10 SDK which ships with Visual Studio. Alternatively, you can download the specific installer from the official website.

  3. Change the dropdown to filter the file types from Component files to All files. This way, the Windows.md file will become visible.

    addwindowsmd.png

  4. Click on it and press Add.

  5. Now press again the Browse button. This time look for the following folder on the system: C:\Windows\Microsoft.NET\Framework\v4.0.30319

  6. Look for a file called System.Runtime.WindowsRuntime.dll, select it and press Ok.

  7. As last step, expand the References section of your project in Solution Explorer and look for the Windows reference.

    WindowsReference.png

  8. Right click on it and choose Properties .

  9. Change the value of the Copy Local property from True to False.

That's it. Now you can leverage APIs from the Universal Windows Platform in your Win32 application. The one we're looking for to check for updates is part of the Windows.ApplicationModel.Package class. Here is a sample usage:

private async Task CheckForUpdates()
{
    var result = await Package.Current.CheckUpdateAvailabilityAsync();
    if (result.Availability == PackageUpdateAvailability.Available)
    {
        MessageBox.Show("There's a new update! Restart your app to install it");
    }
}

As you can see, the API is pretty simple to use. You just call the CheckUpdateAvailabilityAsync(), which will return an enumerator of type PackageUpdateAvailability. The result can assume different values, based on the update status. In the sample, we just use the Available value to determine if there's indeed an update so that we can inform the user with a message. You could also check for the Required value, in case you want to apply a different logic if there's a critical update.

 

Wrapping up

In this short post we have seen some new features that have been added to App Installer in Windows 10 19H1, which addresses many feedbacks received from developers and IT Pros. Now, other than just enabling auto-updating, we can also notify the user that an update is pending; we can handle critical updates; we can support downgrade; we can provide a customized user experience. Thanks to these improvements, MSIX and App Installer are becoming more and more a great choice when it comes to distribute applications interanlly in your enterprise or to your customers!

13 Comments
Occasional Visitor

Is it possible to create different update channels (using this method)?

Microsoft

Hello, not automatically. You would need to publish different versions of the application with a different identity on different websites, otherwise, if you keep the same name and publisher, the apps will "overlap" each other.

If you have this requirement your best chance is to use the Microsoft Store, since it supports the flighting concept. You can define multiple "rings", each of them with a set of specific users. When you publish an update on a specific ring, only the users included in that ring will get it. All the other will continue to get the standard "stable" version from the main channel.

You can find more details here: https://docs.microsoft.com/en-us/windows/uwp/publish/package-flights 

Occasional Visitor

Thank you for the article, @Matteo Pagani. I searched far and wide for this information.

 

Occasional Visitor

Is the app installer supported in Windows 10 IoT Core?

Microsoft

Good question :) I don't know the answer out of the box, let me do some digging.

Occasional Visitor
How can you have one appinstaller file being used by devices with different Windows versions.? want to have one file that Windows 10 1803, 1809 and 1903 use to update using the OnLaunch element.
Microsoft

Hello, if you use an .appinstaller file which contains some features which are supported only on newer versions of Windows 10, they will simply be ignored by earlier versions. For example, if you specify the ShowPrompt attribute, it won't cause any effect if the user is running Windows 10 1809. The application will continue to be silently updated. If the user is on Windows 10 1903, instead, he will see the prompt once there's an update available.

Occasional Visitor
I'm not sure about that. I tried with an .appinstaller with schema http://schemas.microsoft.com/appx/appinstaller/2017/2 that had showprompt="" is="" defined="" in="" the="" =""> App installation failed with error message: error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 12, Column 41, Reason: The attribute 'ShowPrompt' on the element '{http://schemas.microsoft.com/appx/appinstaller/2017/2}OnLaunch' is not defined in the DTD/Schema. (0xc00ce015)
Occasional Visitor
I'm not sure about that. I tried with an .appinstaller with schema http://schemas.microsoft.com/appx/appinstaller/2017/2 that had ShowPrompt="true". ShowPrompt is defined in the http://schemas.microsoft.com/appx/appinstaller/2018 schema. The App Installer UI showed the following message on a Windows 10 1903 device: App installation failed with error message: error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 12, Column 41, Reason: The attribute 'ShowPrompt' on the element '{http://schemas.microsoft.com/appx/appinstaller/2017/2}OnLaunch' is not defined in the DTD/Schema. (0xc00ce015)
Microsoft

The right schema URL to support ShowPrompt is http://schemas.microsoft.com/appx/appinstaller/2018. Using this schema shouldn't block you to use this AppInstaller file on Windows 10 versions earlier than 1903. Did you give it a try?

Occasional Visitor
Yes, if I increase the schema I can use the .appinstaller file on 1903 and 1809, but not on 1803. I would like to not increase the schema because Windows 10 1803 devices will not be able to use the .appinstaller, which is something that I absolutely need (not all devices that run our app are on the latest Windows version). If there was a way to have schemas not depend on Windows version, many problems would disappear. Let's say if I add ShowPrompt to an .appinstaller with 2017/2 schema, ignore it when an 1803 device uses the .appinstaller, but if a 1809 or 1903 device uses the file, consider ShowPrompt. What do you think?
Occasional Visitor

I have a very strange problem attempting to update using app installer and I have no idea where to ask about it, or to report it as a bug except maybe here.

 

My application installs fine.  On updating it and launching it, the update is detected fine.  On clicking the button to install the update it fails with the following lines being written to AILog.txt

 

ERROR: StartInstallOperation -> Install Operation Failed: 0x80070057

GetErrorMessageFromHResult -> Message: [The parameter is incorrect.]

 

Watching the update process in Fiddler, I can see that the appinstaller file is read in its entirety numerous times and then two overlapping range requests are issued for a very small part of the msix package.  

 

I cannot understand what "parameter" can be incorrect since the application installs fine and the msix can be updated directly from powershell.

 

Rather I wonder if it is this strange range request processing that is buggy and the failure is in fact an internal one when it calculates its next wacky range.

 

Is there anything I can do to troubleshoot this further?

Microsoft

Hello Glen,

would you have the chance to share the MSIX package and the AppInstaller file? I will be happy to help troubleshooting this and reach the PG for investigations.

If yes, just send me a mail at name.surname@microsoft.com with all the details.