Inno Setup Uninstall entry is not removed when uninstalling non-administrator installation using another (administrator) account

  • 8 months ago
Comment

ChatGPT
1 / 1

Inno Setup is designed to create uninstall entries in the Windows registry that are specific to the user account that performed the installation. When you uninstall the application from the same user account that installed it, the uninstall entry should be removed automatically.

However, if you install the application using a non-administrator account and then try to uninstall it using a different administrator account, the uninstall entry might not be removed automatically, as the permissions for the uninstall registry keys might not match.

To handle this situation, you can try the following steps:

  1. Uninstall using the original user account: If possible, log in to the original user account that performed the installation and uninstall the application from there.

  2. Modify the uninstall entry permissions: You can modify the permissions of the uninstall registry entry to allow the administrator account to delete it. This can be done by using a script or manually through the Registry Editor.

    Keep in mind that modifying the permissions of registry entries can potentially cause issues if not done correctly. Be cautious and back up the registry before making changes.

  3. Custom uninstaller: You can create a custom uninstaller executable that is run with administrator privileges and designed to remove the application's entries from the registry. This way, the custom uninstaller can handle the permissions correctly.

  4. Automated uninstallation: If you have control over the deployment process, you can use automation tools or scripts to perform the uninstallation using administrator privileges, regardless of the user account that installed the application.

Remember that modifying the Windows registry can have serious consequences if done incorrectly, so always proceed with caution and consider testing changes in a controlled environment first.