SOLVED

Mandatory updates ?

Copper Contributor

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
best response confirmed by John Vintzel (Microsoft)
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

 

 

 

 

 

 

1 best response

Accepted Solutions
best response confirmed by John Vintzel (Microsoft)
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

 

 

 

 

 

 

View solution in original post