SOLVED
Home

Mandatory updates ?

%3CLINGO-SUB%20id%3D%22lingo-sub-219393%22%20slang%3D%22en-US%22%3EMandatory%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219393%22%20slang%3D%22en-US%22%3E%3CP%3EFollowing%20the%20build%20and%20the%20announcements%2C%20I%20read%20the%20blog%20post%20about%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fappconsult%2F2018%2F03%2F22%2Fhandling-auto-updates-for-sideloaded-uwp-and-desktop-bridge-apps%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eauto%20updates%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20as%20I%20understand%2C%20there%20does%20not%20seems%20to%20be%20a%20way%20to%20set%20updates%20as%20mandatory%20%3A%20updates%20are%20downloaded%20in%20background%20when%20the%20app%20is%20ran%20and%20doesn't%20prevent%20the%20user%20from%20launching%20an%20outdated%20version.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20plan%20to%20add%20a%20mandatory%20update%20feature%20%3F%20Using%20the%20ability%20in%20the%20manifest%20to%20declare%20the%20update%20as%20necessary%20and%20prevent%20launching%20the%20app%20without%20updates.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBesides%2C%20clickonce%20allows%20an%20app%20to%20be%20used%20offline%20(in%20case%20the%20install%20manifest%20can't%20be%20joint)%20or%20online%20only%20(the%20install%20manifest%20must%20be%20reachable%20and%20checked)%2C%20do%20you%20plan%20to%20address%20these%20scenarios%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219702%22%20slang%3D%22en-US%22%3ERe%3A%20Mandatory%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219702%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Thomas%2C%3C%2FP%3E%0A%3CP%3EStarting%20%3CSPAN%3Ebuild%20%2317718%3C%2FSPAN%3E%2C%20there%20is%20a%20way%20to%20set%20updates%20as%20mandatory.%3C%2FP%3E%0A%3CP%3EHere's%20what%20you%20need%20to%20do%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20Join%20the%20insiders%20group%20and%20get%20build%20%2317718%20or%20greater.%3C%2FP%3E%0A%3CP%3E2.%20This%20build%20will%20come%20with%20a%20pre-installed%20App%20Installer%20app%20on%20it.%20Make%20sure%20App%20Installer%20app's%20version%20is%201.0.21791.0%20or%20greater.%3C%2FP%3E%0A%3CP%3E3.%20In%20your%20.appinstaller%20file%20set%20the%20following%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ein%20the%20%3CAPPINSTALLER%3E%20section%2C%20set%20the%20schema%20to%3A%26nbsp%3B%3CFONT%3Exmlns%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fappinstaller%2F2018%3C%2FA%3E%22%3C%2FFONT%3E%3C%2FAPPINSTALLER%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%3EAnd%20in%20the%20%3CUPDATESETTINGS%3E%20section%20set%3A%3C%2FUPDATESETTINGS%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%3E%3CONLAUNCH%20hoursbetweenupdatechecks%3D%22%26quot%3B0%26quot%3B%22%20showprompt%3D%22%26quot%3Btrue%26quot%3B%22%20updateblocksactivation%3D%22%26quot%3Btrue%26quot%3B%2F%22%3E%3C%2FONLAUNCH%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%3EWhere%26nbsp%3B%3CSPAN%3EHoursBetweenUpdateChecks%20will%20set%20how%20often%20you%20want%20to%20check%20for%20updates.%20If%20you%20set%20it%20to%20%220%22%20you'll%20check%20on%20every%20launch.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%3E%3CSPAN%3EShowPrompt%20indicates%20you'll%20show%20UI%20letting%20your%20user%20know%20when%20there's%20an%20update%3B%20and%26nbsp%3BUpdateBlocksActivation%3D%22true%22%20ensures%20the%20app%20won't%20start%20unless%20the%20update%20is%20applied.%20If%20you%20set%20this%20variable%20to%20false%2C%20the%20user%20will%20get%20to%20choose%20if%20they%20want%20to%20apply%20the%20update%20before%20starting%20the%20app%2C%20or%20at%20an%20opportune%20time.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%3E%3CSPAN%3ERight%20now%2C%20if%20we%20can't%20check%20for%20an%20update%20(for%20example%2C%20there's%20no%20internet%20connection)%2C%20the%20user%20can%20continue%20using%20the%20old%20version%20of%20the%20app.%20Does%20this%20address%20your%20question%20about%20the%20offline%20apps%2C%20and%20is%20it%20your%20expected%20behavior%3F%20If%20not%2C%20I'd%20love%20to%20hear%20what%20is.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%3E%3CSPAN%3EBest%2C%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%3E%3CSPAN%3ENona%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Thomas Bolon
Visitor

Following the build and the announcements, I read the blog post about auto updates.

 

But as I understand, there does not seems to be a way to set updates as mandatory : updates are downloaded in background when the app is ran and doesn't prevent the user from launching an outdated version.

 

Do you plan to add a mandatory update feature ? Using the ability in the manifest to declare the update as necessary and prevent launching the app without updates.

 

Besides, clickonce allows an app to be used offline (in case the install manifest can't be joint) or online only (the install manifest must be reachable and checked), do you plan to address these scenarios ?

 

Thanks,

1 Reply
Solution

Hi Thomas,

Starting build #17718, there is a way to set updates as mandatory.

Here's what you need to do: 

1. Join the insiders group and get build #17718 or greater.

2. This build will come with a pre-installed App Installer app on it. Make sure App Installer app's version is 1.0.21791.0 or greater.

3. In your .appinstaller file set the following: 

in the <Appinstaller> section, set the schema to: xmlns="http://schemas.microsoft.com/appx/appinstaller/2018"

 

And in the <UpdateSettings> section set:

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

 

Where HoursBetweenUpdateChecks will set how often you want to check for updates. If you set it to "0" you'll check on every launch.

 

ShowPrompt indicates you'll show UI letting your user know when there's an update; and UpdateBlocksActivation="true" ensures the app won't start unless the update is applied. If you set this variable to false, the user will get to choose if they want to apply the update before starting the app, or at an opportune time.

 

Right now, if we can't check for an update (for example, there's no internet connection), the user can continue using the old version of the app. Does this address your question about the offline apps, and is it your expected behavior? If not, I'd love to hear what is.

 

Best,

Nona