[UWP] Win32桌面应用程序升级到UWP应用程序的路径 [英] [UWP] Upgrade path for Win32 desktop applications to UWP Applications

查看:81
本文介绍了[UWP] Win32桌面应用程序升级到UWP应用程序的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要了解为最终用户为U32P商店应用程序定义的Win32桌面应用程序的升级/分发路径。


参考 


我强烈建议您按照此过程来构建您的应用。


最诚挚的问候,


Yong Lu







Need to know the Upgrade/Distribution path defined for Win32 Desktop Applications to UWP Store Applications for end users.

With reference to https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-distribute

It mentions way to uninstall existing Win32 application on launch of UWP application.

In case, after installation of UWP Application if user do not select Launch application then he is left with 2 installed applications.

There are 2 shortcuts for same applications which may cause confusion with user.

Is there any way for removing application at the time of installation or upgrade the existing Win32 application at the time of installation of UWP application from Store.

Thanks and Regards,

Koustubh

解决方案

Hi   KoustubhS,

Actually the installation of Appx is unattended and we cannot modify it by code. So  we cannot remove the win32 application at the time of installation of UWP application. And I don’t think it’s either user friendly or reasonable for you to think about doing this.

Currently, best practice to build the migration process is the following:

  1.The purpose of UWP technology is to let user select what they want. So if you put any of your code to installation process, then user cannot know what happens.

  2.Firstly, we need to make sure that your two apps are recognizable by this way: go to the appxmanifest file -> Application -> Display name -> change as 'xxx_App-UWP'. like this:

    Then, we put uninstall related code in windows_load method, this detection will happen whenever your app starts. And now it’s your choice to help your user to make their choice. If they want to keep both two apps, maybe you can disable this detection.

  3.When loading your app, you can also add the method "IsRunningAsUWP" to detect whether or not you are running as a packaged app or not. In this way, you can show different title to you customer. So they clearly know the difference here.

For details, check the following blog about IsRunningAsUWP https://blogs.msdn.microsoft.com/appconsult/2016/11/03/desktop-bridge-identify-the-applications-context/

I strongly recommend that you follow this process to build your app.

Best Regards,

Yong Lu



这篇关于[UWP] Win32桌面应用程序升级到UWP应用程序的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆