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!

skj
Posts: 40
Joined: Thu Apr 07, 2005 11:08 am

URGENT

hi,

I have to search for particular registry & if it is there then i need to delete it...

& if it is there its needs to be deleted and if it is not there a file has to b added



Thanks
skj
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

What you are trying to do can be achieved with a search in the registry and two custom actions.

Here is how it could be done:

- Go to the "Search" page.

- Use the [ New Search ] toolbar button to schedule a new search. A new property, that will retain the registry path if the search is successful, will appear in the tree. You can rename the property to say, RESULT. Select that property.

- Use the [ Add Location ] toolbar button to select the "Registry" option.

- Set the fields form the "Registry Location Properties" page to the desired values.

For more information please visit:
http://www.advancedinstaller.com/user-guide/search.html

Here is how you could create the custom actions.

- Create a custom action that will delete the registry if the search is successful. You can use a VBScript to do that and set it as an "New Attached Custom Action". Edit the "Expression" field form the "Execution condition" group to RESULT. This custom action will be executed only if the registry location is found.

- Now create an new custom action that will add a file if the search is unsuccessful. This custom action is similar to the previous one. This time edit the "Expression" field to NOT RESULT.

For more information please visit:
http://www.advancedinstaller.com/user-g ... -page.html

All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”