yaronabe
Posts: 1
Joined: Wed Aug 26, 2009 1:59 pm

Find a registry key and delete it

Hi,

I am using Advanced Installer 4.2 to install an Excel base application.
My files includes an excel add-in (.xll).
Upon loading the add-in it is registered under HKEY_CURRENT_USER\software\microsoft\office\<version>\Excel\\Add-in Manager

I am able to find the key using the search action.

What I would like to do is:
During installation, if the key is found - delete the key from the registry.
My problem is:
1. I am looking for the key with RegExp (*filename) - how could I retrive the full key name (full path) from the search result?
2. How do I delete the key? I understand that I should use the Custom Action, but is there a way / command to delete a key from the registry?

Thanks,
Yaron
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Find a registry key and delete it

Hi,
1. I am looking for the key with RegExp (*filename) - how could I retrive the full key name (full path) from the search result?
You can use a custom action to access the search result property, then extract that key name from the search result.
2. How do I delete the key? I understand that I should use the Custom Action, but is there a way / command to delete a key from the registry?
You can use the "reg" command line utility to achieve this. Set it as a "Launch file or open URL" with the appropriate parameters to delete your key. More information on this can be found here.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”