desktop-bridgedesktop-app-converter

Registry not clearing on uninstall of a Desktop App Converted win32 App


I have successfully packaged and tested a win32 App using Desktop App Converter procedures. This App is a standalone EXE with no special installer so I didn't need to run any installer to make the package.

The problem:
I'm finding that when the App is uninstalled, its registry is not cleared. I want it to be cleared so that I can test a "First run" of the application. I was under the impression that all virtualized data (app data and registry) related to an app should automatically be removed on uninstallation. But that is not happening.

Questions:
1) I think registry is not clearing because this app was packaged through DAC as a standalone app and no installer was run. So DAC has no knowledge of its registry usage. Do I need to code something in the AppxManifest so that the registry and appdata clearing takes place on uninstallation?

2) Where do I find the virtualized registry.dat for the app so that I can remove it myself to simulate a first run.

Thanks.


Solution

  • First of all, I think you are stuck using some "old" modernization technology. The Desktop App Converter has been practically deprecated by Microsoft and replaced with the MSIX Packaging Tool, which leads me to the new packaging format - MSIX.

    This is practically an upgrade from the current APPX package you're building, with very little differences with regards to the build/development process.

    To build the MSIX packages you have multiple options. If you also have the source code you can do it directly from Visual Studio. If not, you can use multiple other tools. Check the link I included, in that guide, I included a chapter about the tools available.

    1) That is very strange, usually, there is no problem with this cleanup stage, if the app is uninstalled successfully. Are you sure the registry you see are not in the "real" registry hives from the machine, maybe left there from previous tests? Have you tested the package in a clean virtual machine?

    Do I need to code something in the AppxManifest so that the registry and appdata clearing takes place on uninstallation?

    None that I know of, this is cleaned up automatically by the OS.

    2) As you know, files an registry are redirected. The .dat files for registry storage (with MSIX package you can have multiple .dat files, one for each main registry hive) are stored in the folder:

    AppData\Local\Packages\<AppName>.AppData_<GUID>\\SystemAppData\...

    Sometimes you should also check the subfolders of this folder. Here is a screenshot of what you could find:

    enter image description here