tn8826
Posts: 10
Joined: Wed Jul 28, 2021 10:25 pm

Remove certain registry keys under HKEY_CURRENT_USER for all users

Fri Jan 14, 2022 9:16 pm

Hello,

My company has an installer that runs as per machine and requires Administrator to install.
The application can be ran as regular user.
My question is on uninstallation, how can I remove all of all the registry under HKEY_CURRENT_USER for all users? These keys can be created when normal user launches the app.

I hope my question is clear enough.

Thank you,

Tuan

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Remove certain registry keys under HKEY_CURRENT_USER for all users

Mon Jan 17, 2022 9:23 am

Hello Tuan,

Unfortunately, the setup can not know of the registry entries created by your own application.

To clean those registry entries upon uninstall, you may need to create your own custom action.

Another solution would be the use of a "Uninstall cleanup" support.

For instance, if you application creates the following key: HKCU:\SOFTWARE\test, you would need to recreate that in the "Registry" page and then right click on the key --> "Uninstall cleanup".
test.png
test.png (37.06KiB)Viewed 2471 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

tn8826
Posts: 10
Joined: Wed Jul 28, 2021 10:25 pm

Re: Remove certain registry keys under HKEY_CURRENT_USER for all users

Mon Jan 17, 2022 9:42 pm

Hi Catalin,

Thank you for the reply.
If we use "Uninstall cleanup" support, does it clean the created key(s) from all users' registry or just the current user where the uninstaller is ran?

Thank you,

Tuan

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Remove certain registry keys under HKEY_CURRENT_USER for all users

Tue Jan 18, 2022 11:07 am

Hello Tuan,

You are always welcome!

That depends on where you place the key within Advanced Installer.

For instance, in my screenshot, it will remove the key only for the current user (since the key is placed under "HKEY_CURRENT_USER").

If the key is installed for all users and you want to remove it, you might to create that under "HKEY_LOCAL_MACHINE".

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”