We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

bottonTurn
Posts: 27
Joined: Wed Mar 28, 2018 3:36 pm

How to delete a registry key based on the value

Hi all, thank to take time to read this.

I need to delete a registry key based on the key value, let say I have a key under

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer, with the name MyKey and value 10000 it a Reg_DWORD value,

now during the installation time I need to remove that key only if the MyKey=10000, with this I mean, if myKey=11000 then the registry key can not be removed by the installer.

I can do that? or need to write a custom action?

Regards,
Diego
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to delete a registry key based on the value

Hi Diego and welcome to our forums.

In order to achieve this you can follow the steps below:
- go in the "Search" page, add a new search, then right-click on it and select "Add Location -> Registry"
- configure the registry value that you want to search for
- go in the "Registry" page and create the path to the registry value that you want to remove
- add a new "Registry Value Removal" operation with the same name as the value that you want to remove
- set it to be removed on the "component install" and use the registry search as a condition for it
- build and run the project

Please keep in mind that if you want to remove a registry entry from the 64-bit registry section (outside the "Wow6432Node" key), you need to set the "64-bit Component" flag for the component attached to the "Registry Value Removal" operation. Also, you need to check the "Search the 64-bit portion of the registry" option for the registry search you created.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mmakki
Posts: 1
Joined: Thu Aug 02, 2018 6:33 am

Re: How to delete a registry key based on the value

Hi Team,

I have tried to follow as per your instruction but somehow it is not working. I have to remove the value while uninstalling the package. I have appended the registry data value during the installation.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to delete a registry key based on the value

Hi,

I'm not sure why the removal of your value does not work.

In order to have a better view about the problem, can you please send me the .AIP (project file) and a verbose log of the uninstallation of your product to support at advancedinstaller dot com, so I can investigate them?

Also, please tell me which is the exact path of the registry entry that you want to remove from your machine?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”