Forum Discussion
Adding URI activation to AppxManifest.xml
Chacon As suggested above, we can consider creating a powershell script for creating the registry keys, but we assume the functionality would still not work in the MSIX package due to the lack of permissions.
Based on this, we think that automating the addition of app manifest entries is the best way forward. We'll try to use the makeappx tool (https://docs.microsoft.com/en-us/windows/win32/appxpkg/make-appx-package--makeappx-exe-#to-extract-files-from-a-package) to achieve this. It will be helpful if the MSIX converter is enhanced in the future to support this workflow.
Thank you!
You are right in that using the registry keys to register the URL handler pointing to the installed MSIX package will not work. What I am suggesting instead is to create the registry keys so that the MSIX Packaging Tool generates the manifest entries you need. I didn't mean it as an alternative to adding the manifest entries, but as a way to let the tool do add them for you.
This only works during conversion and not after creating the package. If the packaging tool sees that the installer creates a registration for "C:\Users\username\Applications\MyApp\MyAppName.exe" to handle protocol "myapp-name", then it will create the manifest entries needed to do the same in the package.
- uvinabeysingheSep 23, 2020Copper Contributor
Hi Chacon ,
We tried running the powershell script to install the registry keys during the conversion and the url protocol entries get added to the app manifest correctly.
We are trying to understand why the MSIX package converter detects the registry keys created from the powershell script and does not detect the same registry keys created by our app installers during installation.
We also recently noticed that the MSIX package converter adds the url protocol app manifest key for one of our app “setup.exe"s but not the rest of "setup.exe"s without the powershell script adding the registry keys. We are wondering why it works for some app installers and not for the others.
Thanks!- ChaconSep 23, 2020
Microsoft
Glad to hear it worked.
To investigate why it detects the URL handler for only some apps, you can check if the registry keys were captured by the packaging tool by manually inspecting the virtual registry of the package using the Package Editor. Whether the keys are in the virtual registry or not, has no effect on the URL handler being registered but it tells you for certain whether the problem is that the packaging tool is not seeing the registry keys being created, or that it does see them but does not handle them correctly.
If the tool is not seeing the keys being created, it could be for example that they are being created after the tool stops monitoring system changes.
If the MSIX packaging tool is not interpreting the registry keys correctly to create the manifest entry, you can inspect the conversion logs which may tell you why the URL protocol handler was not added. You can also share the conversion logs here or through Feedback Hub for us to take a look. If you do, please review your logs for any private information you would prefer not to share with us.