How to Auto Start An Application which is packaged using Msix?

那年仲夏 提交于 2021-01-29 08:42:29

问题


I Have an Application and currently getting installed on client machine using .msi (wix Project). now I want to auto Update my application which is out of scope of wix .I am considering MSIX for this task . I Can now auto update my application .

But I am not able to find a way out how to Auto start my application .

In .msi application used to be installed on C: Program Files\ . But now using MSIX its in C:\Program Files\WindowsApps<Some Random ID generated by MSIX>. In .msi it was only a registry entry that made the application Auto start like (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) but now due to this random id I am not able to do that . Any Idea how to make application Auto start ? TIA :)


回答1:


MSIX packaged apps come with a new deployment and configuration paradigm. The most important part to remember is that the operating system guarantees the integrity of the app installed by the MSIX package, this means indirectly that any third-party access to the install folder of the app is forbidden. This means the old ways of executing an EXE do not apply.

The correct way to launch an at startup an EXE from an MSIX package is to define a StartupTask. in your package AppXManifest. The linked article shows multiple methods of doing this, unfortunately the WiX support for MSIX is in a private branch so we don't have any details on this, but you should be able to use the info as a starting point.

Also, here is a similar article from MSFT on how you can start your MSIX-packaged application in different ways.



来源:https://stackoverflow.com/questions/62780861/how-to-auto-start-an-application-which-is-packaged-using-msix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!