Recommended way to uninstall a file that was configured as "Permanent" once

Iku Iwasa 0 Reputation points
2024-02-29T01:41:27.2166667+00:00

I would like to know the officially recommended solution for the following uninstallation issue.

When creating an installer setup project in Visual Studio with Installer Projects extension, one can configure Permanent option to True for each installable file.

Once the installer is installed, changing Permanent option to False does not effect since the Permanent configuration is stored in the OS registry and not removed by uninstall.

The only solution I can find is to remove the following registry value of the component ID of the relevant file.

  • Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\<Component GUID>
  • Registry value: 00000000000000000000000000000000

I would like to know whether the above is officially recommended solution, or there are any other recommended ones for the issue.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,502 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,197 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
227 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,050 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 31,246 Reputation points Microsoft Vendor
    2024-02-29T06:36:57.35+00:00

    Hello @Iku Iwasa,

    Welcome to Microsoft Q&A forum.

    No recommended solutions for uninstalling a file that was configured as "Permanent" once.

    As this old document: Permanent Property says:

    The expected behavior is that uninstalling an application should remove everything that was installed by the application.

    Make sure that you have a good reason before settings the Permanent property to True.

    Normally it’s not suggested to modify the Registry keys, in case you set wrongly for the Permanent option and installed the application, you may have to modify the Registry keys. Backing up the Registry before modifying it is recommended.

    BTW, I helped to add the Windows tag, perhaps, some tools from Windows can better uninstall it and avoid modifying the Registry.

    Have a nice day.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.