Forum Discussion
How to set up an app in MSIX package to re-launch automatically upon Store update?
- Feb 23, 2021
Thanks, Dian Hartono, for the follow up. I think that the non-Store discussion is not directly applicable to my case, but your comment on that was valuable in getting me to a discussion that I think is the one that I've been missing:
https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-extensions#restart-automatically-after-receiving-an-update-from-the-microsoft-store
That section finally answers my question about how an app can discover that it's going to receive an update as well as how to make it restart afterward! I haven't implemented it yet, but I'm optimistic that this is the right track.
Thanks, again!
Hi Terry_Peterson, We do have two documentation that discuss updates for apps in the Store and for apps that were deployed from outside of the store. This does require you to have access to the code for your apps in order to follow the steps in the documentation.
Update non-Store published apps from your code - MSIX | Microsoft Docs
Update Store-published apps from your code - MSIX | Microsoft Docs
Hi, Dian Hartono!
Thanks for your reply. I've looked at the links you posted and unless I'm missing the point they're addressing a different set of issues than the one I'm posing in this conversation. I am deploying my app via the Store and I'm not concerned about discovering if there is an update, but rather how to automatically relaunch a just-updated app so that the user is not left without that app's functions until it is manually relaunched sometime later. I think that is supposed to be part of what the windows.UpdateTask extension is supposed to handle, but so far I've not been able to make that work.
- Dian HartonoFeb 22, 2021
Microsoft
Hi Terry_Peterson in the non Store documentation it provides instructions on how to automatically launch the app after update - Update non-Store published apps from your code - MSIX | Microsoft Docs
Section is called: Automatically restarting your app after an update. Can you check to see if this works for your Store apps? I am follow up internally as well.
- Terry_PetersonFeb 23, 2021Copper Contributor
Thanks, Dian Hartono, for the follow up. I think that the non-Store discussion is not directly applicable to my case, but your comment on that was valuable in getting me to a discussion that I think is the one that I've been missing:
https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-extensions#restart-automatically-after-receiving-an-update-from-the-microsoft-store
That section finally answers my question about how an app can discover that it's going to receive an update as well as how to make it restart afterward! I haven't implemented it yet, but I'm optimistic that this is the right track.
Thanks, again!
- Terry_PetersonFeb 28, 2021Copper Contributor
I've now confirmed that my app restarts after an update. The only fly left in the ointment is that one has to "retry" the update in order for the running app to be closed and updated. Thanks, again to Dian Hartono for pointing me in the right direction to find this solution.