Forum Discussion
Registry keys created after installation and left behind after uninstallation.
uvinabeysinghe (Assuming OS 2004 in this discussion for simplicity, older versions have slight differences). Registry key/item creation and write activity by processes running inside the container are held in the redirected application container hive for the user whenever that activity involves keys that are part of the package definition.
So if the package contains HKCU\Software\Vendor and the app writes to that area, it is redirected and will be removed (by default) when the package is removed. The redirected application container hive exists as a file under the user localappdata packages folder for this package in the form of a .dat file.
But if the app writes to a different area of the registry, those writes will go to the appropriate underlying hive (HKLM/HKCU), be visible using regedit both while the app is present on the system and after removal.
Also if any part of the app "escapes" the container, activity we have previously seen on older OS versions such as powershell scripts, those writes are native and not tied to the package.
It may be possible that there are other small artifacts left behind by install/uninstall of the package alone, but those should be minor and likely reflect bugs.
You can always post additional details of what you are seeing here.
Hi Bogdan Mitrache , TIMOTHY_MANGAN
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myapp-name]
@="URL:myapp-name"
"URL Protocol"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myapp-name\shell]
@="open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myapp-name\shell\open]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myapp-name\shell\open\command]
@="\"C:\\Users\\username\\Applications\\MyApp\\MyAppName.exe\""
The MSIX packaging tool sees these registry keys getting created and adds the corresponding app manifest entry in the MSIX package to support the URI protocol. Since the registry keys are not required in the MSIX package, is there a way to make these keys not get created when MSIX package is installed?
Thank you,
Uvin
- Oct 26, 2020
uvinabeysinghe The MSIX Packaging tool contains a package editor (available after the manifest is created but just before you save the package) where cleanup of this kind could be performed. Why do you feel the need to remove the entries?
I would recommend against cleaning up those entries unless you find that they are actually causing you a problem..
The registry entries inside the package are contained in the application hive and are not visible externally. They would not be used at all in most cases, but there are situations where keeping these inside the package may be necessary.
- These involve interference by forces outside of the package alter the external protocol handler entries.
- Workflows (that do not exist yet but presumably will someday) that allow for using this package as a base for something. In App-V we have package upgrade scenarios that rely on having the original captured components intact, as well as external package enhancement tools that rely on the underlying registry entries to be present.
- Converters to something new (there is always eventually something new to convert to) may need those entries similarly.
- uvinabeysingheOct 27, 2020Copper Contributor
Hi,
The registry keys listed in the above reply are created to support URI scheme in the desktop app installer. MSIX package converter correctly interprets these keys and adds the required AppManifest entry to support URI scheme in the MSIX package.
Based on the discussion in https://techcommunity.microsoft.com/t5/msix-packaging-and-tools/adding-uri-activation-to-appxmanifest-xml/m-p/1704851#M870 , our understanding is that only the AppManifest entries are required to support the URI scheme in MSIX and registry keys are not required.
> The registry entries inside the package are contained in the application hive and are not visible externally.
The registry entries the MSIX package creates are visible externally using RegEdit under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myapp-name.
Is there a way to make these registry keys not get created when the MSIX package is used to install our App?
Thanks,
Uvin