do I have to call RegisterPackage...?

Rudolf Meier 291 Reputation points
2022-02-11T23:22:57.293+00:00

I can install a package (msix) using the Windows.Management.Deployment.PackageManager.AddPackage* ... fine. I can also provision it for all users. Good...

But the setup on GitHub does call "RegisterPackage*" in case AddPackageAsync returns that the package already exists.

Now... I'm wondering, if I install something for all users (via an msi file) and this setup installs the "Windows App Runtime". ... do I have to call this "RegisterPackage" for every user that's using this App so that it can find the "Windows App Runtime"? Or is this no requirement? So, in case it's not a requirement... why does the setup then call it? ... is this some sort of reference counting then? ... so, who's the owner of the reference, if something is installed for all users via an msi file? The system itself?

... and what about calling RegisterPackage* multiple times? What happens then? In case 7 of my applications need the same package for the same user? ... might be, that this is documented. But I cannot find it or I'm too stupid to understand what I read.

... would make sense to me, but it would be nice to get a confirmation for that or an explanation why it is different.

Rudolf

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
732 questions
0 comments No comments
{count} votes